@tiotrom I do see the issue now. But I think it is only going to affect a very small percentage of users, whose servers have been configured weirdly. Let me explain you by what I meant by the server configured weirdly.
The first thing you have to understand is looking at this file, the MemTotal
says the total RAM you have in your system. MemFree
says out of the total RAM, how much is free exactly. Now, if your RAM is being used by buffer or cache, this parameter will not consider that space as free, it considers a space free when it is literally free. Now come to MemAvailable
. Unfortunately MemAvailable
is not available for all system, only systems with ubuntu os or something like that have this parameter. In CentOS or RedHat systems, I haven’t seen it.
Anyways coming to the point MemAvailable
shows how much space it has left to initialize a new program. You can learn more about all these here: https://superuser.com/questions/980820/what-is-the-difference-between-memfree-and-memavailable-in-proc-meminfo
Initially, when I coded this plugin, I did so in a CentOS-based system, so I didn’t have access to that MemAvailable
value, so instead I build my plugin based of MemFree
which is much widely available across all Linux based systems. Then on Github I received an issue report stating using MemAvailable
would be a more accurate value to be used.
So, inside the plugin, I kept a check to know if MemAvailable
parameter exists, if not go for MemFree
. But in any case, the value of MemAvailable
should be lower than MemTotal
, but in your case, it is way higher, not sure why and that is why you are seeing that negative issue.
I’m pushing a new update to plugin right now making sure it only uses MemFree
and not go looking for MemAvailable
as it is highly volatile across systems.
I’ll let you know when the new version has been pushed.