<div dir="ltr">(Forgot to cc the list)<br><br><div class="gmail_quote"><div dir="ltr">On Thu, Aug 4, 2016 at 9:13 AM Jeremy Laidman <<a href="mailto:jlaidman@rebel-it.com.au">jlaidman@rebel-it.com.au</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">On 4 Aug 2016 06:23, "Boldt, David" <<a href="mailto:dboldt@usgs.gov" target="_blank">dboldt@usgs.gov</a>> wrote:<br>
><br>
> I am monitoring a value for which I don't know the possible maximum, which I would like to express as a percentage.</p>
<p dir="ltr">The maximum over what timescale? The graph width? All of time? Or the period of consolidation?</p>
<p dir="ltr">> Expected to be able to do something like this (MAX should be a valid CF):<br>
><br>
>         DEF:packets=fsth.rrd:freepackets:AVERAGE<br>
>         DEF:packetsMAX=fsth.rrd:freepackets:MAX<br>
>         CDEF:packetsPercent=packets,packetsMAX,/,100,*<br>
><br>
> Alas the second line is not valid.<br>
><br>
> What is the appropriate syntax for obtaining a maximum value?</p>
<p dir="ltr">I'm not sure this would give you what you thought it would (if it worked). The MAX will be the maximum of all values that went to make up the consolidated value being graphed at that point only. For a graph showing every 5-minute sample individually, the max is the same as the average.</p>
<p dir="ltr">I'm guessing you want the max over the graph width, so that you'll end up with one point at 100℅ and the rest usually lower (of course a flat line would have all points at 100℅).</p>
<p dir="ltr">Have a look at VDEF. The purpose of VDEF is to consolidate all points over a region of time. Check out the man page for rrdgraph_data for an example using MAX.</p></blockquote><div><br></div><div>And just by way of example, you can use a VDEF to show the peak of a graph such as with this alternative [la] graph definition:</div><div><br></div><div><div>[la]</div><div>        TITLE CPU Load</div><div>        YAXIS Load</div><div>        DEF:avg=la.rrd:la:AVERAGE</div><div>        CDEF:la=avg,100,/</div><div><span style="line-height:1.5">        AREA:la#00CC00:CPU Load Average</span><br></div><div>        -u 1.0</div><div>        GPRINT:la:LAST: \: %5.1lf (cur)</div><div>        GPRINT:la:MAX: \: %5.1lf (max)</div><div>        GPRINT:la:MIN: \: %5.1lf (min)</div><div>        GPRINT:la:AVERAGE: \: %5.1lf (avg)\n</div><div>        VDEF:laMax=la,MAXIMUM</div><div>        LINE:laMax#CC0000:Maximum</div></div><div><div>        GPRINT:laMax: \: %5.1lf\n</div></div><div><br></div><div><span style="line-height:1.5">The only additions here are the last three lines.</span><br></div><div><br></div><div>Resultant graph:</div><div><br></div><div><img src="cid:1565304cabad0cad2201" alt="pasted1" class="" style="max-width: 100%; opacity: 1;"><br></div><div><br></div><div>The red line will be at different levels over different timeframes, but always with the same value as the largest point on the graph.</div><div><br></div><div>Once you have your VDEF variable defined like this, you can percentivise your DEF or CDEF variable into it, and graph that instead (as an exercise for the reader).</div><div><br></div><div>J</div><div><br></div></div></div>