Discussion:
Some issues about RPN of the Device-data point-memAvailSwap_memAvailSwap
James Smith
2013-03-14 04:19:20 UTC
Permalink
James Smith [http://community.zenoss.org/people/flyingfish007] created the discussion

"Some issues about RPN of the Device-data point-memAvailSwap_memAvailSwap"

To view the discussion, visit: http://community.zenoss.org/message/72412#72412

--------------------------------------------------------------
Hi, I have some issues about the RPN. Now I want to add the total swap and the oid is .1.3.6.1.4.1.2021.4.3.0. After I add the data source and the data point, I add it to the memory utilization graph. But when I want to configure the graph point, I don't know how to write the RPN. So I imitate the memAvailableSwap's RPN. So I don't know the expression "1024,*,${here/os/totalSwap},/,1,-,-100,*". My understanding is data*1024/${here/os/totalSwap}-1*-100. At last, I am confused.

Thanks!!
-----James
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/72412#72412]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
jcurry
2013-03-15 12:00:03 UTC
Permalink
jcurry [http://community.zenoss.org/people/jcurry] created the discussion

"Re: Some issues about RPN of the Device-data point-memAvailSwap_memAvailSwap"

To view the discussion, visit: http://community.zenoss.org/message/72419#72419

--------------------------------------------------------------
Hi James,
RPN is Reverse Polish Notation - a way of doing stack-based arithmetic.  There is a slight reference to this in the Zenoss Admin Guide (section 6.2.8 in the Core 4 version), plus a pointer to a further reference on the rrd site - ( http://oss.oetiker.ch/rrdtool/tut/rpntutorial.en.html http://oss.oetiker.ch/rrdtool/tut/rpntutorial.en.html .

Those standard memory graphs are showing the various types of memory as a percentage of the total - hence the RPN.  The raw OID reports figure in Kb.  An easier example to start with are the ones for memBuffer and memCached as I think they closer to what you want.  The others are doing more work in the RPN to try and determine the amounts of memory available.

The RPN for memBuffer uses the datapoint memBuffer_memBuffer and has the RPN of
1024,*,${here/hw/totalMemory},/,100,*

Unspecified, but always there at the start of the Zenoss RPN, is the datapoint you specified, so the RPN is actually:
memBuffer_memBuffer,1024,*,${here/hw/totalMemory},/,100,*

So, the RPN:
1) Multiplies memBuffer_memBuffer by 1024 to get the value to bytes  (memBuffer_memBuffer,1024,*)
2) Divides the result by the total memory for the box (,${here/hw/totalMemory},/ )
3) Multiplies by 100 to get a percentage ( ,100,* )

You should be able to simply substitute your datapoint for total swap into a copy of either the memBuffer or memCached RPN.

Cheers,
Jane
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/72419#72419]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Loading...