summaryrefslogtreecommitdiffstats
path: root/usr/local/www/status_interfaces.php
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2007-03-21 20:57:02 +0000
committerScott Ullrich <sullrich@pfsense.org>2007-03-21 20:57:02 +0000
commit6f7fb5c9500fb8974ae3acb3203543f67f9161b9 (patch)
tree61fc6255430fc63d5b3a90102e718538cc135232 /usr/local/www/status_interfaces.php
parentb7dd3a25e810fd9c57b3eff6eb88e42bd4af119c (diff)
downloadpfsense-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-xusr/local/www/status_interfaces.php16
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/>
OpenPOWER on IntegriCloud