I'm running version 5.4-1 of net-snmp (binaries downloaded from net-snmp site at sourceforge) on an HP-UX B.11.11 machine, and swap space is being incorrectly reported. For example, this command:
snmpget -v1 -Cf -c public localhost UCD-SNMP-MIB::memAvailSwap.0
yields the following output:
UCD-SNMP-MIB::memAvailSwap.0 = INTEGER: -2 kB
The machine has way more than -2 kB of swap; the output of swapinfo is:
Kb Kb Kb PCT START/ Kb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 8388608 0 8388608 0% 0 - 1 /dev/vg00/lvol2
reserve - 734216 -734216
memory 3129692 2753768 375924 88%
snmpd itself reports the same wrong number to our management software.
Logged In: YES
user_id=848638
Originator: NO
I can fully reproduce this on HP-UX 11.11, even with the exact same value (-2).
Logged In: YES
user_id=2176763
Originator: NO
Find the solution at https://sourceforge.net/tracker/?func=detail&atid=312694&aid=2088726&group_id=12694
Thanks for the bug report!
We've fixed the problem in the 5.4.x code branch
and the main development tree, so it should be
fixed in future releases of the Net-SNMP package.
Fixed by patch 2088726 applied in SVN Rev. 17547.