0

It looks like the "MemAvailReal" actually only reports free memory, not available memory. Is there a more recent version of this MIB or a different standard MIB which measures available memory?

I tried this from a CentOS 7.3 system with the following packages, but pretty sure this is the same behavior in the most recent point releases as well.

  • net-snmp-5.7.2-24.el7_2.1.x86_64
  • net-snmp-utils-5.7.2-24.el7_2.1.x86_64
  • net-snmp-libs-5.7.2-24.el7_2.1.x86_64
  • net-snmp-agent-libs-5.7.2-24.el7_2.1.x86_64

Example of behavior:

[root@hostname ~]# free -m
total used free shared buff/cache available
Mem: 7823 232 4183 156 3407 7097
Swap: 2047 12 2035

There is ~7.0 GB of available memory, however...

[root@hostname ~]# snmpwalk -v 2c -c communitystring 127.0.0.1 memAvailReal
UCD-SNMP-MIB::memAvailReal.0 = INTEGER: 4294500 kB

The "memAvailReal" MIB seems to report the free memory.

  • 7.3 is incredibly old. Please retry with 7.6 and see wether there is a difference. The recent version is 5.7.2-37 which might have changed things. – Andreas Rogge Mar 4 at 19:16
  • The highest I can go right now without going out of my way is 7.5 - which has 5.7.2-32, and I can see that that has the same behavior. The kernel has had the same behavior with displaying available memory since 7.1 at a minimum as far as I know. Unless there is a new MIB I am not aware of. – dolthesis Mar 4 at 19:47
  • The value of memAvailReal matches the third column (4183). If you want something matching the first column (7823), please read memTotalReal. – Lex Li Mar 4 at 21:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.