[rrd-users] Is there a possibility to have "always only computed" column?

Maris Janis Vasilevskis mahris at myself.com
Mon Aug 12 09:46:20 CEST 2013


I have two counters, A and B.
And I wish to get
increment A
increment B
percent (increment A)/(increment B)*100

I tried to define the percent through COMPUTE.

I enter with 1 second interval
... (continue a large number of times with step 1)

Everything is fine when I fetch with 1 second resolution:
1000 2000 50
1 1 100
1 1 100

But with a 10 sec interval, I get in first line:
100.9 200.9 95
My percent is averaged: (50 + 9*100)/10
But I need it computed again: 100.9/200.9*100

I wonder whether there is a possibility to get desired percent using RRD, or I should postprocess data in program.

My test database is created as following:
rrdtool create test.rrd --start 359999999 -s 1 \
DS:A:DERIVE:600:0:U \
DS:B:DERIVE:600:0:U \
DS:P:COMPUTE:B,0,EQ,0,A,B,/,IF,100,* \
RRA:AVERAGE:0.5:1:2000 \

Thank you,

More information about the rrd-users mailing list