[rrd-users] cdef 1/X function

jehan procaccia jehan.procaccia at it-sudparis.eu
Tue May 12 22:19:01 CEST 2009

I would like to apply the 1/X function to a data source that returns 1 
(true) and 2 (false) for a policy shape active or not on a cisco edge 
router, here's a sample of the DS:

[root at voila rra]# rrdtool fetch 
cisco_renater_policy_shape_active_oid_965.rrd  LAST
1242157800: 2.0000000000e+00
1242158100: 2.0000000000e+00
1242158400: 2.0000000000e+00
1242158700: 1.0033333333e+00
1242159000: 1.0000000000e+00
1242159300: nan

Here's how I defined my CDEF
/Custom String/: *1,CURRENT_DATA_SOURCE,/*
unfortunatly, from the value 2 I ended up tp 29,01n !? I expected 1/2=0,5 !
hence I supose my 1/X cdef definition is wrong
Can you tell me how to do it ?

moreover, if 1/X works, then I would like to graph (1/X^8) * 1000
can you also let me know how to do that one .


More information about the rrd-users mailing list