This script template is intended to overcome these shortcomings by fetching all of the available memory data from all known sources (including the standard HOST MIB), and then performing basic arithmetic to fill in any gaps in the data.
Hi, of my 8 servers I was getting negative results for usedReal in 5 servers.
I investigated the issue and it was that snmp oid .1.3.6.1.4.1.2021.4.6.0 for availReal is not the same value that /proc/meminfo MemAvailable.
The value received with oid .1.3.6.1.4.1.2021.4.6.0 for availReal is the result of= /proc/meminfo MemAvailable + buffer + cache.
So in order to get the correct value for usedReal you had to subtracts instead of add buffer and cache in lines 120 and 121.
After that fix I get correct positive results for usedReal
Hi, of my 8 servers I was getting negative results for usedReal in 5 servers. I investigated the issue and it was that snmp oid .1.3.6.1.4.1.2021.4.6.0 for availReal is not the same value that /proc/meminfo MemAvailable. The value received with oid .1.3.6.1.4.1.2021.4.6.0 for availReal is the result of= /proc/meminfo MemAvailable + buffer + cache. So in order to get the correct value for usedReal you had to subtracts instead of add buffer and cache in lines 120 and 121.
After that fix I get correct positive results for usedReal