From: Folke Gleumes <f.gleu...@proxmox.com> Expose buffers and cache as separate metrics instead of including them in memfree and memused.
Originally-by: Folke Gleumes <f.gleu...@proxmox.com> [AL: rebased and adapted to changes that happened in the meantime] Signed-off-by: Aaron Lauterer <a.laute...@proxmox.com> --- src/PVE/ProcFSTools.pm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/PVE/ProcFSTools.pm b/src/PVE/ProcFSTools.pm index 185b2b3..91a69be 100644 --- a/src/PVE/ProcFSTools.pm +++ b/src/PVE/ProcFSTools.pm @@ -303,6 +303,8 @@ sub read_meminfo { memfree => 0, memavailable => 0, memused => 0, + membuffers => 0, + memcached => 0, memshared => 0, swaptotal => 0, swapfree => 0, @@ -328,6 +330,8 @@ sub read_meminfo { # available for a new workload, without pushing the system into swap, no amount of calculating # with BUFFER, CACHE, .. will get you there, only the kernel can know this. $res->{memused} = $res->{memtotal} - $d->{memavailable}; + $res->{membuffers} = $d->{buffers}; + $res->{memcached} = $d->{cached}; $res->{swaptotal} = $d->{swaptotal}; $res->{swapfree} = $d->{swapfree}; -- 2.39.5 _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel