netniV / cacti-netsnmp-memory

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.
4 stars 2 forks source link

Negative results in usedReal #6

Closed gjimenezf closed 4 years ago

gjimenezf commented 4 years ago

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