wykres IRC, wiecej statystyk

This commit is contained in:
2026-04-18 18:35:39 +02:00
parent 48128e78ab
commit ea5e654c65
2 changed files with 8 additions and 2 deletions

View File

@@ -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

BIN
stats.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB