SNMP: how to get combined output of memBuffer, memCached and memAvailReal?

Posted by user492160 on Server Fault See other posts from Server Fault or by user492160
Published on 2013-11-06T07:49:44Z Indexed on 2013/11/06 9:56 UTC
Read the original article Hit count: 589

Filed under:
|
|

Below is the output of 'free -m' on my system:

             total       used       free     shared    buffers     cached
Mem:          2026       1936         90          0        212        649
-/+ buffers/cache:       1074        952
Swap:         3359          0       3359

I'd like to retrieve the value 952 of -/+ buffers/cache using 'snmpwalk'. This is for integrating 'free memory' availability with Cacti-poller. But currently the only values available are:

# snmpwalk -v 1 -c public localhost  .1.3.6.1.4.1.2021.4
UCD-SNMP-MIB::memIndex.0 = INTEGER: 0
UCD-SNMP-MIB::memErrorName.0 = STRING: swap
UCD-SNMP-MIB::memTotalSwap.0 = INTEGER: 3440632
UCD-SNMP-MIB::memAvailSwap.0 = INTEGER: 3440576
UCD-SNMP-MIB::memTotalReal.0 = INTEGER: 2075556
UCD-SNMP-MIB::memAvailReal.0 = INTEGER: 92552
UCD-SNMP-MIB::memTotalFree.0 = INTEGER: 3533128
UCD-SNMP-MIB::memMinimumSwap.0 = INTEGER: 16000
UCD-SNMP-MIB::memShared.0 = INTEGER: 0
UCD-SNMP-MIB::memBuffer.0 = INTEGER: 217388
UCD-SNMP-MIB::memCached.0 = INTEGER: 664904
UCD-SNMP-MIB::memSwapError.0 = INTEGER: 0
UCD-SNMP-MIB::memSwapErrorMsg.0 = STRING: 

Is it possible to retrieve the combined value of memBuffer+memCached+memAvailReal using snmpwalk for graphing with Cacti and RRDTool? If not what options do I possibly have?

I'm using net-snmp 5.3.2 on my agent host.

Thanks in advance.

© Server Fault or respective owner

Related posts about snmp

Related posts about cacti