summaryrefslogtreecommitdiffstats
path: root/usr/local/www/status_rrd_graph_img.php
diff options
context:
space:
mode:
authorsmos <seth.mos@dds.nl>2011-03-09 11:58:18 +0100
committersmos <seth.mos@dds.nl>2011-03-09 11:58:18 +0100
commita6917c659bdff1c44308d2055d5a3d3cd82400cc (patch)
treec30bb256c352dc9b5dfd9e76dc39f5ebf11daf5a /usr/local/www/status_rrd_graph_img.php
parentc7cfc09856ca6044b1a4cd5448e53d092bf8416e (diff)
downloadpfsense-a6917c659bdff1c44308d2055d5a3d3cd82400cc.zip
pfsense-a6917c659bdff1c44308d2055d5a3d3cd82400cc.tar.gz
Add the 95th percentile line to the traffic graphs
Diffstat (limited to 'usr/local/www/status_rrd_graph_img.php')
-rw-r--r--usr/local/www/status_rrd_graph_img.php13
1 files changed, 12 insertions, 1 deletions
diff --git a/usr/local/www/status_rrd_graph_img.php b/usr/local/www/status_rrd_graph_img.php
index 34040db..8af6e7d 100644
--- a/usr/local/www/status_rrd_graph_img.php
+++ b/usr/local/www/status_rrd_graph_img.php
@@ -194,6 +194,7 @@ if(file_exists($rrdcolors)) {
log_error(sprintf(gettext("rrdcolors.inc.php for theme %s does not exist, using defaults!"),$g['theme']));
$colortrafficup = array("666666", "CCCCCC");
$colortrafficdown = array("990000", "CC0000");
+ $colortraffic95 = array("660000", "FF0000");
$colorpacketsup = array("666666", "CCCCCC");
$colorpacketsdown = array("990000", "CC0000");
$colorstates = array('990000','a83c3c','b36666','bd9090','cccccc','000000');
@@ -313,23 +314,33 @@ if((strstr($curdatabase, "-traffic.rrd")) && (file_exists("$rrddbpath$curdatabas
$graphcmd .= "CDEF:\"$curif-bytes_t_block=$curif-bytes_in_t_block,$curif-bytes_out_t_block,+\" ";
$graphcmd .= "CDEF:\"$curif-bytes_t=$curif-bytes_in_t_pass,$curif-bytes_out_t_block,+\" ";
+ $graphcmd .= "VDEF:\"$curif-in_bits_95=$curif-in_bits,95,PERCENT\" ";
+ $graphcmd .= "VDEF:\"$curif-out_bits_95=$curif-out_bits,95,PERCENT\" ";
+
$graphcmd .= "AREA:\"$curif-in_bits_block#{$colortrafficdown[1]}:$curif-in-block\" ";
$graphcmd .= "AREA:\"$curif-in_bits_pass#{$colortrafficdown[0]}:$curif-in-pass:STACK\" ";
$graphcmd .= "{$AREA}:\"$curif-out_bits_block_neg#{$colortrafficup[1]}:$curif-out-block\" ";
$graphcmd .= "{$AREA}:\"$curif-out_bits_pass_neg#{$colortrafficup[0]}:$curif-out-pass:STACK\" ";
+ $graphcmd .= "HRULE:\"$curif-in_bits_95#{$colortraffic95[1]}:$curif-in (95%)\" ";
+ $graphcmd .= "HRULE:\"$curif-out_bits_95#{$colortraffic95[0]}:$curif-out (95%)\" ";
+
$graphcmd .= "COMMENT:\"\\n\" ";
- $graphcmd .= "COMMENT:\"\t\t maximum average current period\\n\" ";
+ $graphcmd .= "COMMENT:\"\t\t maximum average current period 95th percentile\\n\" ";
+
$graphcmd .= "COMMENT:\"in-pass\t\" ";
$graphcmd .= "GPRINT:\"$curif-in_bits_pass:MAX:%7.2lf %sb/s\" ";
$graphcmd .= "GPRINT:\"$curif-in_bits_pass:AVERAGE:%7.2lf %Sb/s\" ";
$graphcmd .= "GPRINT:\"$curif-in_bits_pass:LAST:%7.2lf %Sb/s\" ";
$graphcmd .= "GPRINT:\"$curif-bytes_in_t_pass:AVERAGE:%7.2lf %sB i\" ";
+ $graphcmd .= "GPRINT:\"$curif-in_bits_95:%7.2lf %sb/s\" ";
+
$graphcmd .= "COMMENT:\"\\n\" ";
$graphcmd .= "COMMENT:\"out-pass\t\" ";
$graphcmd .= "GPRINT:\"$curif-out_bits_pass:MAX:%7.2lf %sb/s\" ";
$graphcmd .= "GPRINT:\"$curif-out_bits_pass:AVERAGE:%7.2lf %Sb/s\" ";
$graphcmd .= "GPRINT:\"$curif-out_bits_pass:LAST:%7.2lf %Sb/s\" ";
$graphcmd .= "GPRINT:\"$curif-bytes_out_t_pass:AVERAGE:%7.2lf %sB o\" ";
+ $graphcmd .= "GPRINT:\"$curif-out_bits_95:%7.2lf %sb/s\" ";
$graphcmd .= "COMMENT:\"\\n\" ";
$graphcmd .= "COMMENT:\"in-block\t\" ";
$graphcmd .= "GPRINT:\"$curif-in_bits_block:MAX:%7.2lf %sb/s\" ";
OpenPOWER on IntegriCloud