<br><br><div><span class="gmail_quote">On 1/30/07, <b class="gmail_sendername">Simon Hobson</b> &lt;<a href="mailto:linux@thehobsons.co.uk">linux@thehobsons.co.uk</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Ben Griffith wrote:<br><br>&gt;Doesn&#39;t it just add up all the entries to get a total for the hour,<br>&gt;then from that a rate per second?&nbsp;&nbsp;Or does it actually compute the<br>&gt;rate throughout the hour, on the fly?
<br><br>No, it ALWAYS computes an average/max/min depending on what you set<br>in the rrd. Also, you NEED to use average or your figures are<br>guaranteed to be wrong. For example, suppose we just look at 4<br>samples :<br>
<br>1&nbsp;&nbsp;1&nbsp;&nbsp;0&nbsp;&nbsp;0<br><br>Clearly your boiler was running for half the time (give or take a bit<br>due to the sampling), and average would give you 0.5. Max would give<br>you 1 for any period where the boiler ran at all which is not what
<br>you want.</blockquote><div><br>The 1 1 0 0 are counter values, so they are added together and then divided by the step interval.&nbsp; In this case, if the interval was 4 minutes (240 seconds) that would mean 2/240.&nbsp; Since I&#39;ve set up the RRA to contain only one step (size 1 hour), it&#39;s like Alex said: &quot;MIN(x) = MAX(x) = AVG(x) = LAST(x) if there&#39;s only one x.&quot;&nbsp; If I had said the step size was 15 minutes and the RRA contained 4 of them then I&#39;d be in trouble.&nbsp; I didn&#39;t know how all of that worked when I set it up, so I guess I just lucked out.&nbsp; I think I&#39;ve got it now though.&nbsp; I agree that even though MAX works just fine in this case it is misleading.
<br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">&gt;<br>&gt;filename=/usr/local/misterhouse/trunk/data/rrd/Burner_Counter.rrd<br>
&gt;timenow=`date | sed &#39;s/:/\\\:/g&#39;`<br>&gt;rrdtool graph /home/griffith/public_html/boiler_day.png \<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; --end 00\:00 --start end-7d --x-grid<br>&gt;DAY:7:DAY:7:DAY:1:86400:%A \<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; --height 200 --width 500 --imgformat PNG \
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; --title &quot;Boiler run-time per day&quot; --vertical-label &quot;minutes&quot; \<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DEF:day1=$filename:minutes:MAX:start=&quot;midnight<br>&gt;yesterday - 6d&quot;:end=start+23h \
<br><br>Two things wrong here (I think) :<br><br>First, you don&#39;t want max, you want average (see above)<br><br>Second, I think you need &quot;start+24h&quot; not &quot;start+23h&quot;</blockquote><div><br>That&#39;s what I thought too, but &quot;start+24h&quot; and &quot;start+1d&quot; both gave me 25 hours of data instead of 24, and my &quot;bars&quot; overlapped from midnight to 1am.&nbsp; The totals are correct when I use +23h.&nbsp; I guess by saying start is &quot;midnight yesterday&quot; I get that first hour, and then I want 23 more hours, not 24.
<br><br>That doesn&#39;t seem right.&nbsp; Did I find a bug?&nbsp; I&#39;m using 1.2.15-r3 from Gentoo portage.<br></div><br>-Ben</div>