diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2005-01-22 23:30:44 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2005-01-22 23:30:44 +0000 |
commit | a3ad4f8afa98754f8483b26088e6f98d7c80ab36 (patch) | |
tree | fa021e63816ff03ee94c539efe18a49447855b16 /usr | |
parent | 6778d4524f736407242a7d3f62576d5bb5f26223 (diff) | |
download | pfsense-a3ad4f8afa98754f8483b26088e6f98d7c80ab36.zip pfsense-a3ad4f8afa98754f8483b26088e6f98d7c80ab36.tar.gz |
Add swap space graph to main status screen.
Diffstat (limited to 'usr')
-rwxr-xr-x | usr/local/www/index.php | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/usr/local/www/index.php b/usr/local/www/index.php index 53e1835..f565f9b 100755 --- a/usr/local/www/index.php +++ b/usr/local/www/index.php @@ -181,7 +181,31 @@ echo $memUsage . "%"; ?> </td> </tr> + <tr> + <td width="25%" class="vncellt">SWAP usage</td> + <td width="75%" class="listr"> + +<?php + +$swapUsage = `/usr/sbin/swapinfo | cut -c45-55 | grep "%"`; +$swapUsage = ereg_replace('%', "", $swapUsage); +$swapUsage = ereg_replace(' ', "", $swapUsage); + +echo "<img src='bar_left.gif' height='15' width='4' border='0' align='absmiddle'>"; +echo "<img src='bar_blue.gif' height='15' width='" . $swapUsage . "' border='0' align='absmiddle'>"; +echo "<img src='bar_gray.gif' height='15' width='" . (100 - $swapUsage) . "' border='0' align='absmiddle'>"; +echo "<img src='bar_right.gif' height='15' width='5' border='0' align='absmiddle'> "; +echo $swapUsage . "%"; + +?> + + </td> + </tr> + + </table> <?php include("fend.inc"); ?> </body> </html> + + |