wykres IRC, wiecej statystyk
This commit is contained in:
10
stats.php
10
stats.php
@@ -9,6 +9,11 @@ error_reporting(E_ALL);
|
||||
if (in_array($file, array('.', '..'))) continue;
|
||||
array_push($users, $file);
|
||||
}
|
||||
|
||||
$stats = json_decode(file_get_contents('/opt/bots/stats/stats.json'), true);
|
||||
|
||||
$today_msg = $stats['today_msg'];
|
||||
$all_msg = $stats['all_msg'];
|
||||
?>
|
||||
|
||||
<h1>> Statystyki</h1>
|
||||
@@ -16,11 +21,12 @@ error_reporting(E_ALL);
|
||||
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>Liczba wiadomości na IRC: <?=$all_msg?> </li>
|
||||
<li>Liczba wiadomości na IRC dziś: <?=$today_msg?></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>
|
||||
<img src="stats.png" style="max-width: 650px">
|
||||
</article>
|
||||
|
||||
<?php
|
||||
|
||||
Reference in New Issue
Block a user