diff options
author | Seth Mos <seth.mos@xs4all.nl> | 2007-03-21 18:31:08 +0000 |
---|---|---|
committer | Seth Mos <seth.mos@xs4all.nl> | 2007-03-21 18:31:08 +0000 |
commit | b7dd3a25e810fd9c57b3eff6eb88e42bd4af119c (patch) | |
tree | 89b93c231780521bd1a91d004c745312c815754a /usr | |
parent | 77bded260b986e8fed9eba7e904a7cfa53aa3b01 (diff) | |
download | pfsense-b7dd3a25e810fd9c57b3eff6eb88e42bd4af119c.zip pfsense-b7dd3a25e810fd9c57b3eff6eb88e42bd4af119c.tar.gz |
Ignore down or unconfigured interfaces
Diffstat (limited to 'usr')
-rw-r--r-- | usr/local/www/status_rrd_graph_img.php | 9 |
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\" "; |