[rrd-users] rpn to convert NaN to 0

Karl Fischer rrd-users at ficos.de
Sat Mar 14 22:50:30 CET 2009


R Dicaire wrote:
> On Sat, Mar 14, 2009 at 3:13 PM, Mark Hedges <mark at phix.me> wrote:
>> http://oss.oetiker.ch/rrdtool/tut/cdeftutorial.en.html
> 
> Here's what I have, it seems to graph now, but I'm sure there's a
> cleaner way to do it:
> 
> CDEF:vices=vicecast,UN,0,vicecast,IF \
> CDEF:ices=icecast,vices,+,10000,* \

ADDNAN would be a cleaner way, but AFAIK this is available in the 1.3.x
branch only :-(

If you're stuck with 1.2.x for some reason (like I am), there is no
cleaner way, but you can do it in one line by basically replacing
'vices' in your 2nd line by it's definition from the 1st line:

CDEF:ices=icecast,vicecast,UN,0,vicecast,IF,+,10000,*

and, to make this a little bit cleaner, I'd swap the values:

CDEF:ices=vicecast,UN,0,vicecast,IF,icecast,+,10000,*

my .02.

- Karl



More information about the rrd-users mailing list