diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2006-04-17 17:10:09 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2006-04-17 17:10:09 +0000 |
commit | 39bcabb04aee141e7f97fe3275e2bff599de8309 (patch) | |
tree | b509bd2cc9ade984a56eb6c643e662217f74faf1 /usr/local/www/status_rrd_graph.php | |
parent | f61798ae2296aa215b063f7c69792c402214a4ce (diff) | |
download | pfsense-39bcabb04aee141e7f97fe3275e2bff599de8309.zip pfsense-39bcabb04aee141e7f97fe3275e2bff599de8309.tar.gz |
MFC 11607
If there is a error while creating the graph display it. It makes it easier to troubleshoot. The qeueus graph is a good example. Failed to create graph with error code 1, the error is: ERROR: No DS called 'qwanRoot' in '/var/db/rrd/wan-queues.rrd' Using this we can tell users what to do.
Diffstat (limited to 'usr/local/www/status_rrd_graph.php')
-rwxr-xr-x | usr/local/www/status_rrd_graph.php | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/usr/local/www/status_rrd_graph.php b/usr/local/www/status_rrd_graph.php index 33db376..3001f1c 100755 --- a/usr/local/www/status_rrd_graph.php +++ b/usr/local/www/status_rrd_graph.php @@ -366,13 +366,16 @@ else /* check modification time to see if we need to generate image */ if (file_exists("$rrddbpath$curif-$interval-$curgraph.png")) { if((time() - filemtime("$rrddbpath$curif-$interval-$curgraph.png")) >= 280 ) { - system("$graphcmd >/dev/null"); + exec("$graphcmd 2>&1", $graphcmdoutput, $graphcmdreturn); usleep(500); } } else { - system("$graphcmd >/dev/null"); + exec("$graphcmd 2>&1", $graphcmdoutput, $graphcmdreturn); usleep(500); } + if($graphcmdreturn != 0) { + PRINT "Failed to create graph with error code $graphcmdreturn, the error is: $graphcmdoutput[0] <br>\n"; + } PRINT "<B>Analysis for $curif -- $interval $curgraph</B><BR>"; PRINT "<IMG BORDER=1 ALT=\"$ifname $curgraph Graph\" |