summaryrefslogtreecommitdiffstats
path: root/usr/local/www/status_interfaces.php
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2007-03-21 21:15:38 +0000
committerScott Ullrich <sullrich@pfsense.org>2007-03-21 21:15:38 +0000
commit29ed06c99b6d14d6a794906d9c260bcfc6c892e9 (patch)
tree43ad39fc0a932f30fd8b0e78daaabf2e0addc615 /usr/local/www/status_interfaces.php
parent12bade7c3fe038f0ab8fccf3d7ceba61c322b7d6 (diff)
downloadpfsense-29ed06c99b6d14d6a794906d9c260bcfc6c892e9.zip
pfsense-29ed06c99b6d14d6a794906d9c260bcfc6c892e9.tar.gz
Only show interrupts a second if we can obtain the information for that interface
Diffstat (limited to 'usr/local/www/status_interfaces.php')
-rwxr-xr-xusr/local/www/status_interfaces.php17
1 files changed, 11 insertions, 6 deletions
diff --git a/usr/local/www/status_interfaces.php b/usr/local/www/status_interfaces.php
index 2a53f0b..48b4198 100755
--- a/usr/local/www/status_interfaces.php
+++ b/usr/local/www/status_interfaces.php
@@ -406,23 +406,28 @@ include("head.inc");
<?php endif; ?>
<?php if(file_exists("/usr/bin/vmstat")): ?>
- <tr>
- <td width="22%" class="vncellt">Interrupts/Second</td>
- <td width="78%" class="listr">
- <?php
+ <?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 }'`;
- if(strstr($interrupt_total, "uhci")) {
+ if(strstr($interrupt_total, "hci")) {
$interrupt_total = `vmstat -i | grep $real_interface | awk '{ print $4 }'`;
$interrupt_sec = `vmstat -i | grep $real_interface | awk '{ print $5 }'`;
- }
+ }
+ ?>
+ <?php if($interrupt_total): ?>
+ <tr>
+ <td width="22%" class="vncellt">Interrupts/Second</td>
+ <td width="78%" class="listr">
+ <?php
+
echo $interrupt_total . " total";
echo "<br/>";
echo $interrupt_sec . " rate";
?>
</td>
</tr>
+ <?php endif; ?>
<?php endif; ?>
<?php $i++; endforeach; ?>
OpenPOWER on IntegriCloud