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

Tobias Oetiker tobi at oetiker.ch
Mon Nov 25 00:16:27 CET 2013


On 24.11.2013, at 23:56, Jan Johansson <j2 at mupp.net> wrote:

>> 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.
> 
> 
> Thanks!
> 
> 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
> 481x155
>              216.71m
> 
> 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.
> 

yes 21.7% seems right.

cheers
tobi




More information about the rrd-users mailing list