summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
Diffstat (limited to 'usr')
-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