<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>
<div>
<div><div style="color: rgb(0, 0, 0); font-family: times, serif; font-size: 12pt; "><br></div><div style="color: rgb(0, 0, 0); font-family: times, serif; font-size: 12pt; ">I'm trying to resolve an issue with rrd graphing which has the min/last values showing NaN (in my example case below they show zero since I convert NaN to 0.)</div><div style="color: rgb(0, 0, 0); font-family: times, serif; font-size: 12pt; "><br></div><div style="color: rgb(0, 0, 0); font-family: times, serif; font-size: 12pt; "><span class="Apple-style-span" style="font-family:Times;"><div style="font-family:times, serif;"><font class="Apple-style-span" face="'times new roman',
'new york', times, serif">What's the trick to getting a graph to always have data available in the last pixel of the graph so min/last will have data for the legend?</font></div><div><font class="Apple-style-span" face="'times new roman',
'new york', times, serif"><br></font></div></span></div><div style="color: rgb(0, 0, 0); font-family: times, serif; font-size: 12pt; ">I have a graph generator that accepts an end_time; this end_time is already in the past, new records since exist, so it's not an issue of the last_update being the last
record I'm choosing.</div><div style="color: rgb(0, 0, 0); font-family: times, serif; font-size: 12pt; "><br></div><div style="color: rgb(0, 0, 0); font-family: times, serif; font-size: 12pt; ">It seems to be correlated to graph width and time frame (start <-> end). </div><div style="color: rgb(0, 0, 0); font-family: times, serif; font-size: 12pt; "><br></div><div style="color: rgb(0, 0, 0); font-family: times, serif; font-size: 12pt; ">As an example: step 60, two different widths, 287 pixels and 288 pixels for a 2 day period (2880 1 minute datapoints.)</div><div style="color: rgb(0, 0, 0); font-family: times, serif; font-size: 12pt; "><br></div><div style="font-family: times, serif; color: rgb(0, 0, 0); font-size: 12pt; "><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=loadavg1&n=tuolumne&e=1300491600&w=287">http://stalemate.vendetta.com:7171/waterware?a=g&ds=loadavg1&n=tuolumne&e=1300491600&w=287</a> (correct)</span></font></div><div style="font-family: times, serif; color: rgb(0, 0, 0); font-size: 12pt; "><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=loadavg1&n=tuolumne&e=1300491600&w=288">http://stalemate.vendetta.com:7171/waterware?a=g&ds=loadavg1&n=tuolumne&e=1300491600&w=288</a> (shows
zero)</span></font></div><div style="font-family: times, serif; color: rgb(0, 0, 0); font-size: 12pt; "><font class="Apple-style-span" face="'times new roman', 'new york', times, serif"><br></font></div><div style="font-family: times, serif; color: rgb(0, 0, 0); font-size: 12pt; "><font class="Apple-style-span" face="'times new roman', 'new york', times, serif">The interesting part is that the zero's show until 575 pixels - which is coincidentally close to 287*2+1.</font></div><div style="font-family: times, serif; color: rgb(0, 0, 0); font-size: 12pt; "><font class="Apple-style-span" face="'times new roman', 'new york', times, serif"><br></font></div><div style="font-family: times, serif; color: rgb(0, 0, 0); font-size: 12pt; "><font class="Apple-style-span" face="'times new roman', 'new york', times, serif">So why?</font></div><div style="font-family: times, serif; color: rgb(0, 0, 0); font-size: 12pt; "><font class="Apple-style-span" face="'times new
roman', 'new york', times, serif"><br></font></div><div style="font-family: times, serif; color: rgb(0, 0, 0); font-size: 12pt; "><font class="Apple-style-span" face="'times new roman', 'new york', times, serif">It doesn't always
happen either, if I subtract 40 seconds off the end_time used then
data shows at 288 pixels.</font></div><div style="font-family: times, serif; color: rgb(0, 0, 0); font-size: 12pt; "><font class="Apple-style-span" face="'times new roman', 'new york', times, serif"><br></font></div><div style="font-family: times, serif; color: rgb(0, 0, 0); font-size: 12pt; "><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=loadavg1&n=tuolumne&e=1300491560&w=288">http://stalemate.vendetta.com:7171/waterware?a=g&ds=loadavg1&n=tuolumne&e=1300491560&w=288</a></span></font></div><div style="font-family: times, serif; color: rgb(0, 0, 0); font-size: 12pt; "><font class="Apple-style-span" face="'times new roman', 'new york', times, serif"><br></font></div><div style="font-family: times, serif; color: rgb(0, 0, 0); font-size: 12pt; "><font class="Apple-style-span" face="'times new roman', 'new
york', times, serif">However, subtracting 40 seconds from the next interval doesn't work.</font></div><div style="font-family: times, serif; color: rgb(0, 0, 0); font-size: 12pt; "><font class="Apple-style-span" face="'times new roman', 'new york', times, serif"><br></font></div><div style="font-family: times, serif; color: rgb(0, 0, 0); font-size: 12pt; "><font class="Apple-style-span" face="'times new roman',
'new york', times, serif">On this host I'm using rrdtool version 1.4.2 - however this happens with 1.4.5 as well.</font></div><div style="font-family: times, serif; color: rgb(0, 0, 0); font-size: 12pt; "><font class="Apple-style-span" face="'times new roman', 'new york', times, serif"><br></font></div><div style="font-family: times, serif; color: rgb(0, 0, 0); font-size: 12pt; "><font class="Apple-style-span" face="'times new roman', 'new york', times, serif"><span>I found this old ticket, but the resolution in it is not satisfactory: <a target="_blank" href="http://oss.oetiker.ch/rrdtool-trac/ticket/155">http://oss.oetiker.ch/rrdtool-trac/ticket/155</a></span></font></div><div style="color: rgb(0, 0, 0); font-size: 12pt; "><font class="Apple-style-span" face="'times new roman', 'new york', times, serif"><br></font></div><div style="color: rgb(0, 0, 0); font-size: 12pt; "><font class="Apple-style-span" face="'times new roman', 'new york', times,
serif">I currently do _not_ convert min/max to 0 from NaN in the hopes that most of the time it will show properly; but when some data is NaN in more complex RPN calculations it's better to have it 0 than a failure ... ie: NaN shows up anyway at min/max under that situation because I'm not converting.</font></div><div style="color: rgb(0, 0, 0); font-size: 12pt; "><font class="Apple-style-span" face="'times new roman', 'new york', times, serif"><br></font></div><div style="color: rgb(0, 0, 0); font-size: 12pt; "><font class="Apple-style-span" face="'times new roman', 'new york', times, serif">I'm trying to fix that behavior (hence the test case above); I'm trying to use 0 in all calculations with no luck - and it's obvious that it's due to pixels and time-width - just not sure why.</font></div><div style="color: rgb(0, 0, 0); font-size: 12pt; "><font class="Apple-style-span" face="'times new roman', 'new york', times, serif"><br></font></div><div
style="color: rgb(0, 0, 0); font-size: 12pt; "><font class="Apple-style-span" face="'times new roman', 'new york', times, serif">This issue exists for every datapoint I checked stored at that time interval, not just loadavg1. So it definitely seems to be a fundamental issue with fetching and graphing that time for that pixel width.</font></div><div style="color: rgb(0, 0, 0); font-size: 12pt; "><font class="Apple-style-span" face="'times new roman', 'new york', times, serif"><br></font></div><div style="color: rgb(0, 0, 0); font-size: 12pt; "><font class="Apple-style-span" face="'times new roman', 'new york', times, serif">Lastly, I've tried:</font></div><div style="color: rgb(0, 0, 0); font-size: 12pt; "><font class="Apple-style-span" face="'times new roman', 'new york', times, serif"><br></font></div><div style="color: rgb(0, 0, 0); font-size: 12pt; "><font class="Apple-style-span" face="'times new roman', 'new york', times, serif">
1) having rrdtool fetch a little extra data PAST the end of the graph (on the DEF:) but that doesn't work either.</font></div><div><font class="Apple-style-span" face="'times new roman', 'new york', times, serif"><font class="Apple-style-span" size="3"> 2) time/pixel </font>division to set graph width to match for whole integer/even/odd datapoints per pixel - nothing works</font></div><div><font class="Apple-style-span" face="'times new roman', 'new york', times, serif"><font class="Apple-style-span" size="3"><br></font></font></div><div><font class="Apple-style-span" face="'times new roman', 'new york', times, serif"><font class="Apple-style-span" size="3"> </font></font></div><div style="color: rgb(0, 0, 0); font-size: 12pt; "><font class="Apple-style-span" face="'times new roman', 'new york', times, serif">Thanks,</font></div><div style="color: rgb(0, 0, 0); font-size: 12pt; "><font class="Apple-style-span" face="'times new
roman', 'new york', times, serif"><br></font></div><div style="color: rgb(0, 0, 0); font-size: 12pt; "><font class="Apple-style-span" face="'times new roman', 'new york', times, serif"><br></font></div><div style="font-family: times, serif; color: rgb(0, 0, 0); font-size: 12pt; "><font class="Apple-style-span" face="'times new roman', 'new york', times, serif">-Ryan</font></div><div style="font-family: times, serif; color: rgb(0, 0, 0); font-size: 12pt; "><font class="Apple-style-span" face="'times new roman', 'new york', times, serif"><br></font></div><div style="font-family: times, serif; color: rgb(0, 0, 0); font-size: 12pt; "><font class="Apple-style-span" face="'times new roman', 'new york', times, serif">------ fetch data ------</font></div><div style="font-family: times, serif; color: rgb(0, 0, 0); font-size: 12pt; "><font class="Apple-style-span" face="'times new roman', 'new york', times, serif"><br></font></div><div style="font-family: times,
serif; color: rgb(0, 0, 0); font-size: 12pt; "><font class="Apple-style-span" face="'times new roman', 'new york', times, serif"><div>1300491420: 2.4000000000e+01</div><div>1300491480: 4.6000000000e+01</div><div>1300491540: 4.1000000000e+01</div><div>1300491600: 4.6000000000e+01</div><div>1300491660: 4.2000000000e+01</div><div>1300491720: 3.2000000000e+01</div><div>1300491780: 4.3000000000e+01</div><div>1300491840: 4.7000000000e+01</div><div><br></div><div><br></div></font></div><div style="font-family: times, serif; color: rgb(0, 0, 0); font-size: 12pt; "><font class="Apple-style-span" face="'times new roman', 'new york',
times, serif"><br></font></div><div style="color: rgb(0, 0, 0); font-family: times, serif; font-size: 12pt; "></div>
</div><div style="font-family: times, serif; font-size: 12pt; "></div>
</div><div style="font-family: times, serif; font-size: 12pt; "></div>
</div><div style="position: fixed; font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "></div>
</div><br>
</body></html>