[rrd-users] Re: Excluding UNKN or NAN from CDEF

Stephan Harren sh at abovenet.de
Mon Sep 27 18:03:09 MEST 2004


Hi Alex,

yes you're right, but in this case, 1,0,0,unknown will result in 33% as 
the calculation is made like:

count all values > -1
add all values

divide counted/added

CDEF:ResponseSum=PREV,UN,0,PREV,IF,Cleaned,+ 
CDEF:One=Cleaned,-1,GT
CDEF:OneSum=PREV,UN,0,PREV,IF,One,+
CDEF:Uptime=ResponseSum,OneSum,/


which means, when counting, nans are ignored, when adding nans are 
ignored so you'll find 1/3. But I hope that this is exactly what Eric 
wants to achieve.

Cheers,

Stephan

>AFAIK unknowns are ignored when averaging.
>
>In other words: 1,1,1,unknown,1 will result in 100%,  1,0,0,unknown
>will result in 25%
>
>Easy to check, when you run a script on a database with known content.
>Just build a test-rrd, put some data in it and create some graphs.
>
>HTH
>Alex
>  
>

-- 
Stephan Harren
Head of Engineering
AboveNet Deutschland GmbH
-------------------------
Phone +49 69 90554 153
Fax +49 69 90554 111
Cell +49 173 7011126


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