summaryrefslogtreecommitdiffstats
path: root/usr/local/www/status_rrd_graph_img.php
diff options
context:
space:
mode:
authorErmal Luçi <eri@pfsense.org>2014-02-19 16:59:43 +0100
committerErmal Luçi <eri@pfsense.org>2014-02-19 16:59:43 +0100
commit0a3adf06d08cc5900d3deb10d8b7a314c493d768 (patch)
tree8d7b8c9f38be48d4f53f6b20a98f72ac2b89e76b /usr/local/www/status_rrd_graph_img.php
parenta386971b2d274fcfcbfac0d20073c4e202808442 (diff)
parenta592ec6a73ab39ef9e3f6ac59b4bbc7c4accc540 (diff)
downloadpfsense-0a3adf06d08cc5900d3deb10d8b7a314c493d768.zip
pfsense-0a3adf06d08cc5900d3deb10d8b7a314c493d768.tar.gz
Merge pull request #935 from nagyrobi/patch-9
Update status_rrd_graph_img.php
Diffstat (limited to 'usr/local/www/status_rrd_graph_img.php')
-rw-r--r--usr/local/www/status_rrd_graph_img.php47
1 files changed, 47 insertions, 0 deletions
diff --git a/usr/local/www/status_rrd_graph_img.php b/usr/local/www/status_rrd_graph_img.php
index b139d5a..ef0f9ee 100644
--- a/usr/local/www/status_rrd_graph_img.php
+++ b/usr/local/www/status_rrd_graph_img.php
@@ -254,6 +254,9 @@ $colorspamdconn = array('AA00BB', 'FFFFFF', '660088', 'FFFF88', '006600');
/* OpenVPN Users Online Users */
$colorvpnusers = array('990000');
+/* NTPD stats offset, clk jit, sys jit, wander */
+$colorntpd = array('0080FF','00E344','FF0000','000000');
+
/* Captive Portal Total Users Total Users */
/* Captive Portal Concurrent Concurrent Users */
$colorcaptiveportalusers = array('990000');
@@ -1177,6 +1180,50 @@ elseif((strstr($curdatabase, "-concurrent.rrd")) && (file_exists("$rrddbpath$cur
$graphcmd .= "COMMENT:\"\\n\" ";
$graphcmd .= "COMMENT:\"\t\t\t\t\t\t\t\t\t\t\t\t\t`date +\"%b %d %H\:%M\:%S %Y\"`\" ";
}
+elseif((strstr($curdatabase, "ntpd.rrd")) && (file_exists("$rrddbpath$curdatabase"))) {
+ /* define graphcmd for ntpd (was: mbuf) usage stats */
+ $graphcmd = "$rrdtool graph $rrdtmppath$curdatabase-$curgraph.png ";
+ $graphcmd .= "--start $start --end $end --step $step ";
+ $graphcmd .= "--vertical-label \"time\" ";
+ $graphcmd .= "--color SHADEA#eeeeee --color SHADEB#eeeeee ";
+ $graphcmd .= "--title \"`hostname` - {$prettydb} - {$hperiod} - {$havg} average\" ";
+ $graphcmd .= "--height 200 --width 620 ";
+ $graphcmd .= "DEF:\"offset=$rrddbpath$curdatabase:offset:AVERAGE:step=$step\" ";
+ $graphcmd .= "DEF:\"sjit=$rrddbpath$curdatabase:sjit:AVERAGE:step=$step\" ";
+ $graphcmd .= "DEF:\"cjit=$rrddbpath$curdatabase:cjit:AVERAGE:step=$step\" ";
+ $graphcmd .= "DEF:\"wander=$rrddbpath$curdatabase:wander:AVERAGE:step=$step\" ";
+ $graphcmd .= "LINE2:\"offset#{$colorntpd[0]}:offset\" ";
+ $graphcmd .= "LINE2:\"sjit#{$colorntpd[1]}:sjit\" ";
+ $graphcmd .= "LINE2:\"cjit#{$colorntpd[2]}:cjit\" ";
+ $graphcmd .= "LINE2:\"wander#{$colorntpd[3]}:wander\" ";
+ $graphcmd .= "COMMENT:\"\\n\" ";
+ $graphcmd .= "COMMENT:\"\t\t minimum average maximum current\\n\" ";
+ $graphcmd .= "COMMENT:\"Offset \" ";
+ $graphcmd .= "GPRINT:\"offset:MIN:%7.2lf %s \" ";
+ $graphcmd .= "GPRINT:\"offset:AVERAGE:%7.2lf %s \" ";
+ $graphcmd .= "GPRINT:\"offset:MAX:%7.2lf %s \" ";
+ $graphcmd .= "GPRINT:\"offset:LAST:%7.2lf %S \" ";
+ $graphcmd .= "COMMENT:\"\\n\" ";
+ $graphcmd .= "COMMENT:\"System jitter \" ";
+ $graphcmd .= "GPRINT:\"sjit:MIN:%7.2lf %s \" ";
+ $graphcmd .= "GPRINT:\"sjit:AVERAGE:%7.2lf %s \" ";
+ $graphcmd .= "GPRINT:\"sjit:MAX:%7.2lf %s \" ";
+ $graphcmd .= "GPRINT:\"sjit:LAST:%7.2lf %S \" ";
+ $graphcmd .= "COMMENT:\"\\n\" ";
+ $graphcmd .= "COMMENT:\"Clock jitter \" ";
+ $graphcmd .= "GPRINT:\"cjit:MIN:%7.2lf %s \" ";
+ $graphcmd .= "GPRINT:\"cjit:AVERAGE:%7.2lf %s \" ";
+ $graphcmd .= "GPRINT:\"cjit:MAX:%7.2lf %s \" ";
+ $graphcmd .= "GPRINT:\"cjit:LAST:%7.2lf %S \" ";
+ $graphcmd .= "COMMENT:\"\\n\" ";
+ $graphcmd .= "COMMENT:\"Clk freq wander\" ";
+ $graphcmd .= "GPRINT:\"wander:MIN:%7.2lf %s \" ";
+ $graphcmd .= "GPRINT:\"wander:AVERAGE:%7.2lf %s \" ";
+ $graphcmd .= "GPRINT:\"wander:MAX:%7.2lf %s \" ";
+ $graphcmd .= "GPRINT:\"wander:LAST:%7.2lf %S \" ";
+ $graphcmd .= "COMMENT:\"\\n\" ";
+ $graphcmd .= "COMMENT:\"\t\t\t\t\t\t\t\t\t\t\t\t\t`date +\"%b %d %H\:%M\:%S %Y\"`\" ";
+}
else {
$data = false;
log_error(sprintf(gettext("Sorry we do not have data to graph for %s"),$curdatabase));
OpenPOWER on IntegriCloud