clean
This commit is contained in:
28
stats.php
Normal file
28
stats.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
include 'header.php';
|
||||
|
||||
ini_set("display_errors", "On");
|
||||
error_reporting(E_ALL);
|
||||
|
||||
$users = array();
|
||||
foreach (scandir("/home/") as $file) {
|
||||
if (in_array($file, array('.', '..'))) continue;
|
||||
array_push($users, $file);
|
||||
}
|
||||
?>
|
||||
|
||||
<h1>> Statystyki</h1>
|
||||
<article id="content">
|
||||
Statystyki z tego serwera tilde
|
||||
<ul>
|
||||
<li>Liczba użytkowników: <?=count($users);?></li>
|
||||
<li>Liczba wiadomości na IRC: TODO </li>
|
||||
<li>Liczba wiadomości na IRC dziś: TODO</li>
|
||||
<li>Ostatni server load: <?=shell_exec("/usr/bin/top -n 1 | grep Load | cut -d' ' -f3,4,5");?></li>
|
||||
<li>Wolny RAM: <?=shell_exec("/usr/bin/free -h | grep Mem | awk '{print \$NF}'");?>
|
||||
</ul>
|
||||
</article>
|
||||
|
||||
<?php
|
||||
include 'footer.php';
|
||||
?>
|
||||
Reference in New Issue
Block a user