summaryrefslogtreecommitdiffstats
path: root/usr/local/www/status_rrd_graph_img.php
diff options
context:
space:
mode:
authorSeth Mos <seth.mos@xs4all.nl>2007-03-21 18:31:08 +0000
committerSeth Mos <seth.mos@xs4all.nl>2007-03-21 18:31:08 +0000
commitb7dd3a25e810fd9c57b3eff6eb88e42bd4af119c (patch)
tree89b93c231780521bd1a91d004c745312c815754a /usr/local/www/status_rrd_graph_img.php
parent77bded260b986e8fed9eba7e904a7cfa53aa3b01 (diff)
downloadpfsense-b7dd3a25e810fd9c57b3eff6eb88e42bd4af119c.zip
pfsense-b7dd3a25e810fd9c57b3eff6eb88e42bd4af119c.tar.gz
Ignore down or unconfigured interfaces
Diffstat (limited to 'usr/local/www/status_rrd_graph_img.php')
-rw-r--r--usr/local/www/status_rrd_graph_img.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/usr/local/www/status_rrd_graph_img.php b/usr/local/www/status_rrd_graph_img.php
index ed14851..c7cbe85 100644
--- a/usr/local/www/status_rrd_graph_img.php
+++ b/usr/local/www/status_rrd_graph_img.php
@@ -226,6 +226,15 @@ elseif(strstr($curdatabase, "-throughput.rrd")) {
$graphtputbyt = "";
foreach($ifdescrs as $ifdescr) {
$ifname = $ifdescr['friendly'];
+ $state = $ifdescr['up'];
+ /* skip interfaces that do not have a friendly name */
+ if ("$ifname" == "") {
+ continue;
+ }
+ /* or are down */
+ if (!$state) {
+ continue;
+ }
/* collect all interface stats */
$graphcmd .= "\"DEF:{$ifname}-in_bytes={$rrddbpath}{$ifname}-traffic.rrd:in:AVERAGE\" ";
$graphcmd .= "\"DEF:{$ifname}-out_bytes={$rrddbpath}{$ifname}-traffic.rrd:out:AVERAGE\" ";
OpenPOWER on IntegriCloud