[rrd-users] counting with PREV

Christophe Van Ginneken christophe.vanginneken at telindus.com
Wed Jun 18 16:45:30 MEST 2003


Hi all,

I'm trying to count the number of times a value surpasses a given value.
This is roughly what I had in mind:

DEF:val:some.rrd:ds0:AVERAGE
CDEF:prev_surpasses=val,POP,PREV,UN,PREV,0,IF
CDEF:surpasses:val,256000,GT,prev_surpasses,prev_surpasses,1,+,IF

but it doesn't work (why else would I call for help with you guys) :)

On a related note I also want to count the number of samples I'm dealing
with:

DEF:val:some.rrd:ds0;AVERAGE
CDEF:samples:val,POP,PREV,UN,PREV,0,IF,1,+

but I always get a NaN if I gprint out the samples variable.

BTW isn't there another way to do :

CDEF:samples:PREV,UN,PREV,0,IF,1,+

because adding the val,POP trick is a bit annoying...

Anyhow, I hope to stir up some thoughts and maybe discuss some options,
solutions, ...

thanks in advance,
Christophe VG

--
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://www.ee.ethz.ch/~slist/rrd-users
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi



More information about the rrd-users mailing list