-----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 : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] la part de itris Envoyé : lundi 25 septembre 2000 23:51 À : [email protected] 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:[EMAIL PROTECTED] Help mailto:[EMAIL PROTECTED] Archive http://www.ee.ethz.ch/~slist/rrd-users WebAdmin http://www.ee.ethz.ch/~slist/lsg2.cgi -- Unsubscribe mailto:[EMAIL PROTECTED] Help mailto:[EMAIL PROTECTED] Archive http://www.ee.ethz.ch/~slist/rrd-users WebAdmin http://www.ee.ethz.ch/~slist/lsg2.cgi
