[rrd-users] Calculation that is a bit over my head.

Jan Johansson j2 at mupp.net
Sun Nov 24 23:56:34 CET 2013

>no problem, then you just log 0 or 1 (again with GAUGE) and if you ask rrdtool for the average over a given timespan this will be the ratio of time the value has been 1.


Ok, I found an old post and try to modify that to my needs

rrdtool graph /usr/share/nginx/www/test.png -s "now-1 day" -e "now" DEF:ds0=/opt/Krokopool/RRDDatabases/Styrning_Varmare.rrd:Styrning_Varmare:AVERAGE VDEF:ds1=ds0,AVERAGE LINE:ds0\#FF0000:ds0 PRINT:ds1:%20.2lf%s

Does this mean 21,67% "on" for the given time span?

The reason for asking is that it does not seem reasonable. But I wanted to double check that my code seem correct before I start investigating other possible reasons for incorrect data.

More information about the rrd-users mailing list