<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:'times new roman', 'new york', times, serif;font-size:12pt"><div style="color: black; font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "><br></div><div style="color: black; font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; ">That trick no longer seems to work:</div><div style="color: black; font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "><br></div><div><font class="Apple-style-span" face="'times new roman', 'new york', times, serif"><span><a target="_blank" href="http://stalemate.vendetta.com:7171/waterware?a=g&ds=icmpMus&n=tuolumne&e=1300491600&w=360">http://stalemate.vendetta.com:7171/waterware?a=g&ds=icmpMus&n=tuolumne&e=1300491600&w=360</a></span></font></div><div><font class="Apple-style-span" face="'times new roman', 'new york',
times, serif"><br></font></div><div><font class="Apple-style-span" face="'times new roman', 'new york', times, serif">that's 360 pixels, 2880 datapoints with presumably 8 datapoints per pixel. I can even add an entire 3 hours to the end of the DEF: and have the graph still not display the extra data and the min/last still show 0 (or rather that last pixel is nan.)</font></div><div><font class="Apple-style-span" face="'times new roman', 'new york', times, serif"><br></font></div><div><font class="Apple-style-span" face="'times new roman', 'new york', times, serif">This is coming from an RRD that has step 60 for 3 months and step300 for 2years.</font></div><div><font class="Apple-style-span" face="'times new roman', 'new york', times, serif"><br></font></div><div><font class="Apple-style-span" face="'times new roman', 'new york', times, serif">Data graph is for yesterday:</font></div><div><font class="Apple-style-span" face="'times new roman', 'new york',
times, serif"><br></font></div><div><font class="Apple-style-span" face="'times new roman', 'new york', times, serif"><div>$ perl -e 'print localtime(1300491600) . "\n";'</div><div>Fri Mar 18 16:40:00 2011</div><div><br></div><div>So 'not enough data' isn't the reason either.</div><div><br></div><div>I'm debating using ADDNAN in the 'zero calculations' and getting rid of the nan->0 conversion; it probably will correct for more of the problem; but there's still something going weird with nan and that last pixel that I'd much rather correct for properly. If there was a real formula for width and fetching data to make sure that last pixel had data I would prefer to do that. </div><div><br></div><div>It's too bad MULTIPLYNAN and SUBTRACTNAN don't exist. :-) ADDNAN alone isn't sufficient; especially with more complex rpn.</div><div><br></div><div><br></div><div>-Ryan</div><div><br></div></font></div><div style="font-family: 'times new
roman', 'new york', times, serif; font-size: 12pt; color: black; "><br><div style="font-family:arial, helvetica, sans-serif;font-size:10pt"><font size="2" face="Tahoma"><hr size="1"><b><span style="font-weight: bold;">From:</span></b> Alex van den Bogaerdt <alex@vandenbogaerdt.nl><br><b><span style="font-weight: bold;">To:</span></b> rrd-users@lists.oetiker.ch<br><b><span style="font-weight: bold;">Sent:</span></b> Sat, March 19, 2011 3:27:23 AM<br><b><span style="font-weight: bold;">Subject:</span></b> Re: [rrd-users] VDEF min/last incorrectly show NaN<br></font><br>----- Original Message ----- <br>From: "Ryan Kubica" <<a ymailto="mailto:kubicaryan@yahoo.com" href="mailto:kubicaryan@yahoo.com">kubicaryan@yahoo.com</a>><br>To: <<a ymailto="mailto:rrd-users@lists.oetiker.ch" href="mailto:rrd-users@lists.oetiker.ch">rrd-users@lists.oetiker.ch</a>><br>Sent: Saturday, March 19, 2011 8:29 AM<br>Subject: [rrd-users] VDEF min/last incorrectly
show NaN<br><br><br>><br>><br>> I'm trying to resolve an issue with rrd graphing which has the min/last <br>> values<br>> showing NaN (in my example case below they show zero since I convert NaN <br>> to 0.)<br><br>"min" should ignore NaN, so let it work on data you did not yet do that <br>conversion for.<br><br>> What's the trick to getting a graph to always have data available in the <br>> last<br>> pixel of the graph so min/last will have data for the legend?<br><br>The trick used to be (don't know if it still works or not) to match start <br>time, end time and duration with your RRA.<br>Each pixel should have a whole number of CDPs (RRA buckets), and not just <br>any of them, you would need to match it so that if you would have an RRA <br>that could be used to display one CPD per pixel, it would work. So if "a <br>whole number" is 1, you should have an RRA that covers the whole time range <br>you're asking for, with
boundaries exactly on start and end time, and with <br>graph_width multiplied by time_per_CDP equals end time - start time.<br><br>Simplest test case:<br>"steps" is the amount of time in each CDP<br>"n" is any integer<br>let end time (in unix since epoch time) be n * steps<br>give the graph a certain width in pixels<br>start time is end time - (graph_width * steps)<br><br>> I have a graph generator that accepts an end_time; this end_time is <br>> already in<br>> the past, new records since exist, so it's not an issue of the last_update <br>> being<br>> the last record I'm choosing.<br>><br>> It seems to be correlated to graph width and time frame (start <-> end).<br>><br>> As an example: step 60, two different widths, 287 pixels and 288 pixels <br>> for a 2<br>> day period (2880 1 minute datapoints.)<br>><br>> <a
href="http://stalemate.vendetta.com:7171/waterware?a=g&ds=loadavg1&n=tuolumne&e=1300491600&w=287" target="_blank">http://stalemate.vendetta.com:7171/waterware?a=g&ds=loadavg1&n=tuolumne&e=1300491600&w=287</a><br>> (correct)<br>> <a href="http://stalemate.vendetta.com:7171/waterware?a=g&ds=loadavg1&n=tuolumne&e=1300491600&w=288" target="_blank">http://stalemate.vendetta.com:7171/waterware?a=g&ds=loadavg1&n=tuolumne&e=1300491600&w=288</a><br>> (shows zero)<br><br>If you want to show 2880 CDPs in 288 pixels, RRDtool has to consolidate 10 <br>CDPs on the fly. Your end time should be n*10*60. It is, thus there is no <br>need for RRDtool to "massage" anything,<br><br>First thing to do is to make sure there is enough data in your RRA. If not, <br>maybe another RRA, covering more time, is a better match to what you ask, <br>and RRDtool rightfully selects that RRA.<br>In your
case this means the RRA should have at least 2880 CDPs, plus the <br>amount of CDPs needed to cover the time between 1300491600 and 'now'.<br><br>> The interesting part is that the zero's show until 575 pixels - which is<br>> coincidentally close to 287*2+1.<br><br>Another reason to look for problems with the size of your RRA with 1-minute <br>slots. <br><br>_______________________________________________<br>rrd-users mailing list<br><a ymailto="mailto:rrd-users@lists.oetiker.ch" href="mailto:rrd-users@lists.oetiker.ch">rrd-users@lists.oetiker.ch</a><br><a href="https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users" target="_blank">https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users</a><br></div></div><div style="position: fixed; color: black; font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "></div>
</div><br>
</body></html>