[rrd-users] TR: problems with prev

Sébastien Saint-Sevin sebastien.saint-sevin at alinea.net
Wed Sep 27 17:39:02 MEST 2000




-----Message d'origine-----
This is because you always have to check for the first data sample that is
instantiated within a CDEF.
For this first sample, PREV is undefined and therefore returns UNKNOWN.

Let's get with a simple example :
The following CDEF build a counter that inc by 1 (and count data samples).

CDEF:counter=some_value,POP,1,PREV,UN,0,PREV,IF,+

Conclusion:
-----------
This means that you MUST always use PREV in conjunction with UN to
make it works.

Hope this is clear enough (and right !! at least, that's the way I'm using
PREV).

SEB.

-----Message d'origine-----
De : rrd-users-bounce at list.ee.ethz.ch
[mailto:rrd-users-bounce at list.ee.ethz.ch]De la part de itris
Envoyé : lundi 25 septembre 2000 23:51
À : rrd-users at list.ee.ethz.ch
Objet : [rrd-users] problems with prev



Hi all,

I've spent some time with RRD and am fairly comfertable with it. One thing I
was trying lately was making some kind of counter, counting the nr of times
data in an rrd would be unknown.
so that would be like:
CDEF:nrunknown=PREV,UN,currentvalue,+
or even
CDEF:nrunknown=currentvalue,0,LE,PREV,UN,+

right?
So why doesn't this work..

the real live graph I'm using and trying to get to show (with an ever
increasing line) the unknown data's:

rrdtool graph $grafixdir$in{'pingid'}-uur$in{'logaritmisch'}.png
$in{'logaritmisch'} -z -a PNG --start -3600 --end -15 --width 600
DEF:RTTavg=$pingrrd:pingtime:AVERAGE
CDEF:fast=RTTavg,0,LE,INF,0,IF
AREA:fast#000000:"lost packet"
LINE1:RTTavg#0000FF:"RTT, one sample every 6 seconds"
CDEF:pl=RTTavg,0,LE,PREV,1,+,PREV,IF
GPRINT:pl:MAX:"pl %lf"
LINE3:pl#FFFF00:pl

pl always returns NaN :(

can anyone help me out here, or is PREV bugged?

thanks,


Itris


--
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



--
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