Hi,<br><br>I have a RRD that was defined as follows: <br><br>rrdtool create $sensor.rrd -s 3600 \<br> DS:minutes:ABSOLUTE:3600:0:60 \<br> RRA:MAX:0.5:1:4800 <br><br>Once per minute the RRD is updated with a 1 if my boiler is running, or a 0 if it is not. From that I can easily make a pseudo bar graph showing how many minutes the boiler was running in each hour, using this command:
<br><br>rrdtool graph /home/griffith/public_html/boiler_time.png \<br> --start -5_day --y-grid 1:5 --x-grid HOUR:1:HOUR:24:HOUR:6:0:%I%p \<br> --height 200 --width 650 --imgformat PNG \<br> --title "Boiler run-time per Hour" --vertical-label "minutes" \
<br> DEF:ib1=/usr/local/misterhouse/trunk/data/rrd/Burner_Counter.rrd:minutes:MAX \<br> CDEF:minperhr=ib1,3600,* \<br> AREA:minperhr#ff0000 \<br> COMMENT:"$timenow"
<br><br>I'm not sure if MAX is appropriate for the RRA in my case or not, but
all four aggregate functions gave me the same (correct) results for the hourly
graph.<br><br>What I'd like to do now is have a similar pseudo bar graph showing how many minutes the boiler was running each day. I thought the following command should do it:<br><br>rrdtool graph /home/griffith/public_html/boiler_day.png \
<br> --start -5_day --x-grid DAY:1:DAY:1:DAY:1:86400:%A \<br> --height 200 --width 500 --imgformat PNG \<br> --title "Boiler run-time per day" --vertical-label "minutes" \
<br> DEF:ib1=/usr/local/misterhouse/trunk/data/rrd/Burner_Counter.rrd:minutes:MAX:step=86400 \<br> CDEF:minperday=ib1,86400,* \<br> AREA:minperday#ff0000 \<br> COMMENT:"$timenow"
<br><br>For some reason this is not making the step boundaries at midnight, but at 19:00. The consolidation doesn't seem to be giving me the "minutes per second" rate that I got without consolidation. When I multiply by the number of seconds in a day I'm getting a daily rate that I think is about three times what it should be.
<br><br>OK, I just figured out why the rate was wrong. I needed to add ":reduce=AVERAGE" to the end of the DEF line (or I guess maybe I should have used AVERAGE instead of MAX when I defined the RRA). Now the rates look correct, but the step boundaries are still at 19:00 instead of at midnight. I tried supplying start and end times in the DEF, but the boundaries are still always placed at 19:00. How can I change that?
<br><br>Thanks,<br>Ben<br><br><br>