"snmp" displays incorrect or negative memory values on monitoring software
Issue
-
When using various software to view memory values provided by "snmp", incorrect or negative values are shown.
-
An example of this is when a monitoring application uses the following calculations:
RealFree = memTotalFree + memBuffer + memCached
RealUsed = memTotalReal - RealFree
-
Due to incorrect memory calculations reported by "snmp" (which can be checked with
snmpbulkwalk -v2c -c XXX 127.0.0.1 .1.3.6.1.4.1.2021.4
) ,RealFree
gets reported as greater thanmemTotalReal
. This causesRealUsed
to become a negative number, resulting in the application displaying the negative number or an invalid value. -
Also
memTotalFree
is reported as greater thanmemTotalReal
, which should not be possible.
Environment
- Red Hat Enterprise Linux (RHEL) 7.7
- net-snmp-5.7.2-43.el7.x86_64
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.