diff --git a/html/includes/graphs/generic_bits.inc.php b/html/includes/graphs/generic_bits.inc.php
index 54f57356ac..8e3daa94f7 100644
--- a/html/includes/graphs/generic_bits.inc.php
+++ b/html/includes/graphs/generic_bits.inc.php
@@ -37,6 +37,11 @@ $rrd_options .= " CDEF:doutbits_max=doutoctets_max,8,*";
$rrd_options .= " CDEF:inbits=inoctets,8,*";
$rrd_options .= " CDEF:inbits_max=inoctets_max,8,*";
+if ($config['rrdgraph_real_95th']) {
+ $rrd_options .= " CDEF:highbits=inoctets,outoctets,MAX,8,*";
+ $rrd_options .= " VDEF:95thhigh=highbits,95,PERCENT";
+}
+
$rrd_options .= " VDEF:totin=inoctets,TOTAL";
$rrd_options .= " VDEF:totout=outoctets,TOTAL";
$rrd_options .= " VDEF:tot=octets,TOTAL";
@@ -60,6 +65,12 @@ $rrd_options .= " GPRINT:outbits:LAST:%6.2lf%s";
$rrd_options .= " GPRINT:outbits:AVERAGE:%6.2lf%s";
$rrd_options .= " GPRINT:outbits_max:MAX:%6.2lf%s";
$rrd_options .= " GPRINT:95thout:%6.2lf%s\\\\n";
+
+if ($config['rrdgraph_real_95th']) {
+ $rrd_options .= " HRULE:95thhigh#FF0000:\"Highest\"";
+ $rrd_options .= " GPRINT:95thhigh:\"%30.2lf%s\\n\"";
+}
+
$rrd_options .= " GPRINT:tot:'Total %6.2lf%s'";
$rrd_options .= " GPRINT:totin:'(In %6.2lf%s'";
$rrd_options .= " GPRINT:totout:'Out %6.2lf%s)\\\\l'";
diff --git a/includes/defaults.inc.php b/includes/defaults.inc.php
index ccc286b999..f3a81431b8 100644
--- a/includes/defaults.inc.php
+++ b/includes/defaults.inc.php
@@ -83,6 +83,7 @@ $config['uptime_warning'] = "84600"; ## Time in seconds to disp
$config['rrdgraph_def_text'] = "-c BACK#EEEEEE00 -c SHADEA#EEEEEE00 -c SHADEB#EEEEEE00 -c FONT#000000 -c CANVAS#FFFFFF -c GRID#a5a5a5";
$config['rrdgraph_def_text'] .= " -c MGRID#FF9999 -c FRAME#5e5e5e -c ARROW#5e5e5e -R normal";
+$config['rrdgraph_real_95th'] = FALSE; # Set to TRUE if you want to display the 95% based on the highest value. (aka real 95%)
$config['overlib_defaults'] = ",FGCOLOR,'#ffffff', BGCOLOR, '#e5e5e5', BORDER, 5, CELLPAD, 4, CAPCOLOR, '#555555', TEXTCOLOR, '#3e3e3e'";
$list_colour_a = "#ffffff";