<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/4.4.4">
</HEAD>
<BODY>
Hi Lutz,<BR>
<BR>
This is probably a result of consolidation (and Averaging) that occurs when several samples is combined when RRD-tool creates the graph.<BR>
It does this when it finds out that you have more values available - than what you have pixels in the graph.<BR>
<BR>
You can see the result of the averaged/consolidated Max and Min values compared to the Max of Max and Min of Min-values in the following graph.<BR>
<A HREF="http://stats.villaelmerfjord.se/test_minmax-am18_week19_hourly.png">http://stats.villaelmerfjord.se/test_minmax-am18_week19_hourly.png</A><BR>
<BR>
We have 5 years of 5 minute resolution - so no consolidation occurs in the data-files.<BR>
Even if you have a Average RRD, you can get (and keep) the max and min-values if you override the default consolidation method.<BR>
The above graph was created with the following arguments.
<PRE>
<FONT SIZE="2">rrdtool graph test_minmax-am18_week19_full.png --imgformat PNG -s 1367791200 -e 1368396000 --height=700 --width 1600 \</FONT>
<FONT SIZE="2"> DEF:ds0=/home/httpd2/htdocs/admin/power/am18-temp_fahrenheit.rrd:ds0:AVERAGE \</FONT>
<FONT SIZE="2"> DEF:ds0max=/home/httpd2/htdocs/admin/power/am18-temp_fahrenheit.rrd:ds0:AVERAGE:reduce=MAX \</FONT>
<FONT SIZE="2"> DEF:ds0min=/home/httpd2/htdocs/admin/power/am18-temp_fahrenheit.rrd:ds0:AVERAGE:reduce=MIN \</FONT>
<FONT SIZE="2"> VDEF:ds0avg=ds0,AVERAGE \</FONT>
<FONT SIZE="2"> VDEF:ds0avgmax=ds0,MAXIMUM \</FONT>
<FONT SIZE="2"> VDEF:ds0avgmin=ds0,MINIMUM \</FONT>
<FONT SIZE="2"> VDEF:ds0maxmax=ds0max,MAXIMUM \</FONT>
<FONT SIZE="2"> VDEF:ds0minmin=ds0min,MINIMUM \</FONT>
<FONT SIZE="2"> VDEF:ds0pct=ds0,95,PERCENT \</FONT>
<FONT SIZE="2"> LINE1:ds0#0000FF:"Temperature" \</FONT>
<FONT SIZE="2"> LINE1:ds0max#FF0000:"Temp Max" \</FONT>
<FONT SIZE="2"> LINE1:ds0min#00FF00:"Temp Min" \</FONT>
<FONT SIZE="2"> LINE1:ds0avgmax#FF0050:"Temp Avg Max" \</FONT>
<FONT SIZE="2"> LINE1:ds0avgmin#00FFA0:"Temp Avg Min" \</FONT>
<FONT SIZE="2"> LINE1:ds0maxmax#FF50A0:"Temp Max of Max" \</FONT>
<FONT SIZE="2"> LINE1:ds0minmin#50FFA0:"Temp Min of Min" \</FONT>
<FONT SIZE="2"> LINE1:ds0pct#101010:"95 Percentile\l" \</FONT>
<FONT SIZE="2"> COMMENT:" \l" \</FONT>
<FONT SIZE="2"> COMMENT:"Average " \</FONT>
<FONT SIZE="2"> COMMENT:"MaxAverage " \</FONT>
<FONT SIZE="2"> COMMENT:"MinAverage " \</FONT>
<FONT SIZE="2"> COMMENT:"MaxOfMax " \</FONT>
<FONT SIZE="2"> COMMENT:"MinOfMin " \</FONT>
<FONT SIZE="2"> COMMENT:"95th percentile\l" \</FONT>
<FONT SIZE="2"> GPRINT:ds0avg:"%6.2lf %SdegF" \</FONT>
<FONT SIZE="2"> GPRINT:ds0avgmax:"%6.2lf %SdegF" \</FONT>
<FONT SIZE="2"> GPRINT:ds0avgmin:"%6.2lf %SdegF" \</FONT>
<FONT SIZE="2"> GPRINT:ds0maxmax:"%6.2lf %SdegF" \</FONT>
<FONT SIZE="2"> GPRINT:ds0minmin:"%6.2lf %SdegF" \</FONT>
<FONT SIZE="2"> GPRINT:ds0pct:"%6.2lf %SdegF\l"</FONT>
</PRE>
<BR>
The important thing here is the additional DEFS I create where I specify the reduce functions. (to override the default AVERAGE that is specified in our RRDs).<BR>
The last part is just for printing the different values under the graph.<BR>
<BR>
/Johan<BR>
<BR>
<TABLE CELLSPACING="0" CELLPADDING="0" WIDTH="100%">
<TR>
<TD>
-- <BR>
<FONT SIZE="2"><FONT COLOR="#000080"> </FONT></FONT> <BR>
<B><FONT SIZE="2">Johan Elmerfjord</FONT></B> <FONT SIZE="1">| Sr. Systems Administration/Mgr, EMEA | Adobe Systems, Product Technical Operations | p. +45 3231 6008 | x86008 | cell. +46 735 101 444 | Jelmerfj@adobe.com</FONT> <BR>
<BR>
</TD>
</TR>
</TABLE>
On Wed, 2013-09-11 at 02:07 -0700, Lutz Schulze wrote:
<BLOCKQUOTE TYPE=CITE>
Hello,
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
we use RRDTools with an own PHP script and generate graphs at this way:
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
$options = "";<BR>
$options .= " $img_file";<BR>
$options .= " -t \"$vdesc\t$desc2\" ";<BR>
$options .= " --start $start";<BR>
$options .= " --end $end";<BR>
$options .= " -w $width";<BR>
$options .= " -h $height";<BR>
$options .= " --slope-mode";<BR>
$options .= " -c SHADEA#f0f0f0 ";<BR>
$options .= " -c SHADEB#f0f0f0 ";<BR>
$options .= " -W ".$config['watermark'];<BR>
$options .= " -c ARROW#58A6A7 ";<BR>
$options .= " DEF:$val=$rrd_file:$sid:AVERAGE";<BR>
$options .= " LINE2:$val$color[$i]:\"$beschreibung\" ";<BR>
$options .= " GPRINT:$val:LAST:\"%4.1lf\"";<BR>
$options .= " GPRINT:$val:MIN:\"min %4.1lf%s\"";<BR>
$options .= " GPRINT:$val:MAX:\"max %4.1lf%s\l\"";<BR>
<BR>
popen(RRDTOOL." graph $options", "r");
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
When we now generate graphs with different sizes unfortunately the values for LAST, MIN and MAX change also:
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
small picture:<BR>
<A HREF="http://km2.klima-monitor.de/system.graph.php?mode=view&vid=3&t=y&se=2&start=01.01.2013&end=01.01.2014&width=429&height=200">http://km2.klima-monitor.de/system.graph.php?mode=view&vid=3&t=y&se=2&start=01.01.2013&end=01.01.2014&width=429&height=200</A><BR>
<BR>
big picture:<BR>
<A HREF="http://km2.klima-monitor.de/system.graph.php?mode=view&vid=3&t=y&se=2&start=01.01.2013&end=01.01.2014&width=837&height=400">http://km2.klima-monitor.de/system.graph.php?mode=view&vid=3&t=y&se=2&start=01.01.2013&end=01.01.2014&width=837&height=400</A>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
I think it is a problem with sampling the used values from the archive. Is there a way to make this better?
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
Thank you for all help
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
Lutz
</BLOCKQUOTE>
</BODY>
</HTML>