|
|
- <?php
-
- $now = new \DateTimeImmutable('now');
- $formatter = new \IntlDateFormatter('fr_FR.UTF8', IntlDateFormatter::FULL, IntlDateFormatter::FULL, 'Europe/Paris');
-
- ?><!DOCTYPE html>
- <html lang="fr">
- <head>
- <meta charset="utf-8" />
- <meta name="viewport" content="width=device-width, initial-scale=1" />
- <title>Monitoring</title>
- <style type="text/css" media="screen">img { width: 100%; height: auto; }</style>
- </head>
- <body>
- <h1 id="top">
- Monitoring
- <small><?php echo $formatter->format($now); ?></small>
- </h1>
-
- <nav>
- <a href="#cpu">Processeur</a>
- <a href="#mem">Mémoire</a>
- <a href="#net">Réseau</a>
- <a href="#disk">Disque</a>
- </nav>
-
- <h2 id="cpu">Processeur</h2>
- <details>
- <summary>Détails</summary>
- <pre><?php $output = ''; exec('cat /proc/cpuinfo', $output); echo implode(PHP_EOL, $output); ?></pre>
- </details>
- <p>
- <img src="cpu-daily.svg" />
- </p>
- <p>
- <img src="load-daily.svg" />
- </p>
-
-
- <h2 id="mem">Mémoire</h2>
- <details>
- <summary>Détails</summary>
- <pre><?php $output = ''; exec('cat /proc/meminfo', $output); echo implode(PHP_EOL, $output); ?></pre>
- </details><p>
- <img src="mem-daily.svg" />
- </p>
-
- <h2 id="net">Réseau</h2>
- <details>
- <summary>Détails</summary>
- <pre><?php $output = ''; exec('cat /proc/net/dev', $output); echo implode(PHP_EOL, $output); ?></pre>
- </details><p>
- <img src="net-daily.svg" />
- <img src="net-weekly.svg" />
- <img src="net-monthly.svg" />
- </p>
-
- <h2 id="disk">Disque</h2>
- <details>
- <summary>Détails</summary>
- <pre><?php $output = ''; exec('df -hlT -x tmpfs -x devtmpfs --total 2>/dev/null', $output); echo implode(PHP_EOL, $output); ?></pre>
- </details>
- <p>
- <img src="disk-daily.svg" />
- <img src="disk-weekly.svg" />
- <img src="disk-monthly.svg" />
- </p>
-
- </body>
- </html>
|