[rrd-users] CDEF calculation delay? arithmetic vs boolean operators
Sunia Yang
stech169 at yahoo.com
Mon Sep 18 21:05:55 MEST 2006
I'm a newbie to rrdtool so I'm hoping I'm just doing something stupid.
Right now, it seems that boolean operators in CDEF have a delay in computation. I'm using rrdgraph (tried both using RRDP under perl and rrd.cgi) to print values for current bandwidth, average bandwidth, currently if the bandwidth is greater than zero, and on average if the bandwidth is greater than zero. Here's the graph command:
graph dummy.png -s end-86400 -e now-600 --step 120
DEF:BwIn1=bw.rrd:ds0:AVERAGE:step=120:end=now-600:start=end=86400
CDEF:bitsin=BwIn1,8,*
CDEF:bb=BwIn1,0,GT
"PRINT:bitsin:AVERAGE: Avg in %4.1lf %Sbps"
"PRINT:bitsin:LAST: Curr In %4.1lf %Sbps"
"PRINT:bb:AVERAGE: Avg > 0 %3.6lf"
"PRINT:bb:LAST: Curr > 0 %3.6lf"
The rrd step size is 120. I seem to get two different outputs:
Half the time, I get the following, as expected:
Avg in 100.4 Mbps
Curr In 162.3 Mbps
Avg > 0 1.000000
Curr > 0 1.000000
The other half the time, I get the following:
Avg in 100.4 Mbps
Curr In 162.3 Mbps
Avg > 0 0.997230
Curr > 0 0.000000
These two results are definitely linked to step size- they flop from one to another every 120 seconds.
It seems that the boolean GT command is bumping into unknown values for last value which is not surprising. But the arithmetic * command doesn't seem to have the same problem (CF = "LAST").
Also, given the definition of end=now-600, it seems that the last point (which could be unknown) should not figure in the average calculations. I thought, by forcing the step size to 120s, rrdtool would use the finest resolution RRA so the possible unknown last point would cover an interval much less than the 600s lopped off the end.
Any help would be much appreciated! Thanks!
Sue
---------------------------------
How low will we go? Check out Yahoo! Messengers low PC-to-Phone call rates.
--
Unsubscribe mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
Help mailto:rrd-users-request at list.ee.ethz.ch?subject=help
Archive http://lists.ee.ethz.ch/rrd-users
WebAdmin http://lists.ee.ethz.ch/lsg2.cgi
More information about the rrd-users
mailing list