[rrd-users] Simple questions about RRD
Jean-Yves Avenard
jyavenard at gmail.com
Fri Dec 4 01:52:33 CET 2009
Hi.
Long time user of RRDtool ; but I haven't got into creating new graph
in a while and I'm a bit confused about one detail...
I'm monitoring the power usage at my house with a new gizmo I installed...
Data is collected by a python script every 6s ; I average the data
over a minute and feed it to a rrd database.
I store two years of one minute data (just because I have plenty of disk space)
rrdtool create currentcost.rrd -s 60 \
DS:total:GAUGE:600:0:U \
DS:ch1:GAUGE:600:0:U \
DS:ch2:GAUGE:600:0:U \
DS:ch3:GAUGE:600:0:U \
RRA:AVERAGE:0.5:1:1054080 \
RRA:AVERAGE:0.5:1440:1830 \
RRA:MIN:0.5:1:527040 \
RRA:MIN:0.5:1440:1830 \
RRA:MAX:0.5:1:527040 \
RRA:MAX:0.5:1440:1830
I draw my daily graph with
$ret = exec("$RRDTOOL graph images/powerday.png -l 0 \
-t 'POWER - DAILY' \
-x HOUR:1:HOUR:4:HOUR:2:0:%k \
--step 60 --end $timestamp -w $DAYWIDTH -h $DAYHEIGHT \
DEF:total=currentcost.rrd:total:AVERAGE DEF:ch2=currentcost.rrd:ch2:AVERAGE \
DEF:solar=solarprod.rrd:total:AVERAGE DEF:ch1=currentcost.rrd:ch1:AVERAGE \
DEF:totalmin=currentcost.rrd:total:MIN DEF:ch2min=currentcost.rrd:ch2:MIN \
DEF:solarmin=solarprod.rrd:total:MIN DEF:ch1min=currentcost.rrd:ch1:MIN \
DEF:totalmax=currentcost.rrd:total:MAX DEF:ch2max=currentcost.rrd:ch2:MAX \
DEF:solarmax=solarprod.rrd:total:MAX DEF:ch1max=currentcost.rrd:ch1:MAX \
scale is calculated so no rounding is done ....
But with the way power usage go ; it's a very broken graph... So I
would like to show 5 minutes average instead for the daily graph...
does calling rrdgraph with --step 300 is all that is required to get 5
minutes average ? It doesn't seem to be a 5 minutes average to me
looking at the generated graph ; still having big spike on the minute
I turned on my boiler kettle. A 5 minutes average should have removed
the skipe.
If that's not the way, how do I graph 5 minutes average when my data
is made of 1 minute recording ?
Thanks
Jean-Yves
More information about the rrd-users
mailing list