You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

57 lines
1.4 KiB

  1. <?php
  2. $now = new \DateTimeImmutable('now');
  3. $formatter = new \IntlDateFormatter('fr_FR.UTF8', IntlDateFormatter::FULL, IntlDateFormatter::FULL, 'Europe/Paris');
  4. ?><!DOCTYPE html>
  5. <html lang="fr">
  6. <head>
  7. <meta charset="utf-8" />
  8. <meta name="viewport" content="width=device-width, initial-scale=1" />
  9. <title>Monitoring</title>
  10. </head>
  11. <body>
  12. <h1>
  13. Monitoring
  14. <small><?php echo $formatter->format($now); ?></small>
  15. </h1>
  16. <h2>Processeur</h2>
  17. <details>
  18. <summary>Détails</summary>
  19. <pre><?php $output = ''; exec('cat /proc/cpuinfo', $output); echo implode(PHP_EOL, $output); ?></pre>
  20. </details>
  21. <p>
  22. <img src="cpu-daily.svg" />
  23. </p>
  24. <p>
  25. <img src="load-daily.svg" />
  26. </p>
  27. <h2>Mémoire</h2>
  28. <details>
  29. <summary>Détails</summary>
  30. <pre><?php $output = ''; exec('cat /proc/meminfo', $output); echo implode(PHP_EOL, $output); ?></pre>
  31. </details><p>
  32. <img src="mem-daily.svg" />
  33. </p>
  34. <h2>Réseau</h2>
  35. <details>
  36. <summary>Détails</summary>
  37. <pre><?php $output = ''; exec('cat /proc/net/dev', $output); echo implode(PHP_EOL, $output); ?></pre>
  38. </details><p>
  39. <img src="net-daily.svg" />
  40. </p>
  41. <h2>Disque</h2>
  42. <details>
  43. <summary>Détails</summary>
  44. <pre><?php $output = ''; exec('df -hlT -x tmpfs -x devtmpfs --total 2>/dev/null', $output); echo implode(PHP_EOL, $output); ?></pre>
  45. </details><p>
  46. <img src="disk-daily.svg" />
  47. </p>
  48. </body>
  49. </html>