Gandalf | 3 Dec 2010 22:07

Re: CDEF help


On 03.12.2010 19:17, Tim Eberhard wrote:
> All,
>
> I'm trying to create this formula for measuring light levels on a DWDM
> system. Tx_Pwr(dBm) = 10xlog(AV/10000). AV is the SNMP value
try cdef=CURRENT_DATA_SOURCE,10000,/,LOG,10,*

Reinhard

>
> So basically.. I need 10xlog(SNMP_Value/10000). I tried to do this via
> a custom CDEF function but it's erroring out. Hopefully someone can
> point out my issue as I haven't dealt with any custom cdefs in the
> past.
>
> Item 	Item Value 	
> Item #1 	Custom String: 10 	
> Item #2 	Operator: * 	
> Item #3 	Function: LOG 	
> Item #4 	Another CDEF: dwdm backend
>
> Item 4 is this:
> Item #1 	Special Data Source: CURRENT_DATA_SOURCE
> Item #2 	Operator: /
> Item #3 	Custom String: 10000
>
>
> Here is what I get:
> RRDTool Command:
(Continue reading)

Tim Eberhard | 3 Dec 2010 22:45
Picon

Re: CDEF help

So that made the graphs work and now rrdtool can run without errors,
but it doesn't appear to be correct. My value is 49, from my spine
debug.
12/03/2010 01:26:02 PM - SPINE: Poller[0] Host[977] DS[19214] SCRIPT:
/usr/bin/python /var/www/html/cacti-0.8.7e/scripts/ekn_light_levels.py
10.17.2.52 8 x2, output: 49

Manually plugging that 49/10000 = 0.0049. into a dbm converter
(http://www.aubraux.com/design/milli-watts-to-dbm-calculator.php)
gives me a value of 0.0049 milli watt(s) = -23.0980391997 dBm.

Cacti is showing me -52.

RRDTool Command:

/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="TX-HOU9991-EKN-1 - Received level  Slot 8 Port X2" \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="" \
--slope-mode \
--font TITLE:8: \
--font AXIS:8: \
--font LEGEND:8: \
(Continue reading)

Gandalf | 4 Dec 2010 00:01

Re: CDEF help

I translated your request into a CDEF. But http://en.wikipedia.org/wiki/DBm 
tells me, that the formulae should look differently (where P is given in W)

Reinhard

On 03.12.2010 22:45, Tim Eberhard wrote:
> So that made the graphs work and now rrdtool can run without errors,
> but it doesn't appear to be correct. My value is 49, from my spine
> debug.
> 12/03/2010 01:26:02 PM - SPINE: Poller[0] Host[977] DS[19214] SCRIPT:
> /usr/bin/python /var/www/html/cacti-0.8.7e/scripts/ekn_light_levels.py
> 10.17.2.52 8 x2, output: 49
>
> Manually plugging that 49/10000 = 0.0049. into a dbm converter
> (http://www.aubraux.com/design/milli-watts-to-dbm-calculator.php)
> gives me a value of 0.0049 milli watt(s) = -23.0980391997 dBm.
>
> Cacti is showing me -52.
>
>
> RRDTool Command:
>
> /usr/bin/rrdtool graph - \
> --imgformat=PNG \
> --start=-86400 \
> --end=-300 \
> --title="TX-HOU9991-EKN-1 - Received level  Slot 8 Port X2" \
> --base=1000 \
> --height=120 \
> --width=500 \
(Continue reading)


Gmane