SNMP: how to get combined output of memBuffer, memCached and memAvailReal?
- by user492160
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.