summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
authornagyrobi <robreg@zsurob.hu>2014-02-18 15:26:45 +0100
committernagyrobi <robreg@zsurob.hu>2014-02-18 15:26:45 +0100
commita592ec6a73ab39ef9e3f6ac59b4bbc7c4accc540 (patch)
treeb888c6b0dd0d99982e355a6a9c4aead825e47fb3 /usr
parentb8ab37b8296c11a6e2f85c2b121c8d5c23a6b6db (diff)
downloadpfsense-a592ec6a73ab39ef9e3f6ac59b4bbc7c4accc540.zip
pfsense-a592ec6a73ab39ef9e3f6ac59b4bbc7c4accc540.tar.gz
Update status_rrd_graph_img.php
Add NTP graph drawing
Diffstat (limited to 'usr')
-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 4a55103..0231ff8 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