diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2007-03-21 20:57:02 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2007-03-21 20:57:02 +0000 |
commit | 6f7fb5c9500fb8974ae3acb3203543f67f9161b9 (patch) | |
tree | 61fc6255430fc63d5b3a90102e718538cc135232 /usr/local/www/status_interfaces.php | |
parent | b7dd3a25e810fd9c57b3eff6eb88e42bd4af119c (diff) | |
download | pfsense-6f7fb5c9500fb8974ae3acb3203543f67f9161b9.zip pfsense-6f7fb5c9500fb8974ae3acb3203543f67f9161b9.tar.gz |
If vmstat is present then display interrupt total and rate. Recent snapshots already contain vmstat.
Diffstat (limited to 'usr/local/www/status_interfaces.php')
-rwxr-xr-x | usr/local/www/status_interfaces.php | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/usr/local/www/status_interfaces.php b/usr/local/www/status_interfaces.php index 0496d3d..7724496 100755 --- a/usr/local/www/status_interfaces.php +++ b/usr/local/www/status_interfaces.php @@ -405,6 +405,22 @@ include("head.inc"); </tr> <?php endif; ?> + <?php if(file_exists("/usr/bin/vmstat")): ?> + <tr> + <td width="22%" class="vncellt">Interrupts/Second</td> + <td width="78%" class="listr"> + <?php + $real_interface = convert_friendly_interface_to_real_interface_name($ifname); + $interrupt_total = `vmstat -i | grep $real_interface | awk '{ print $3 }'`; + $interrupt_sec = `vmstat -i | grep $real_interface | awk '{ print $4 }'`; + echo $interrupt_total . " total"; + echo "<br/>"; + echo $interrupt_sec . " rate"; + ?> + </td> + </tr> + <?php endif; ?> + <?php $i++; endforeach; ?> </table> <br/> |