[rrd-users] rate per day graph from rate per hour DS
griffithba at gmail.com
Mon Jan 29 23:34:33 CET 2007
I have a RRD that was defined as follows:
rrdtool create $sensor.rrd -s 3600 \
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:
rrdtool graph /home/griffith/public_html/boiler_time.png \
--start -5_day --y-grid 1:5 --x-grid
--height 200 --width 650 --imgformat PNG \
--title "Boiler run-time per Hour" --vertical-label "minutes"
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
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:
rrdtool graph /home/griffith/public_html/boiler_day.png \
--start -5_day --x-grid DAY:1:DAY:1:DAY:1:86400:%A \
--height 200 --width 500 --imgformat PNG \
--title "Boiler run-time per day" --vertical-label "minutes" \
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.
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?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the rrd-users