pve_exporter icon indicating copy to clipboard operation
pve_exporter copied to clipboard

Free/Used-Confusion

Open UweOhse opened this issue 6 years ago • 2 comments

Hello,

the "free" values of ram, swap, disk in the output of pve_exporter are really the "used" values from the PVE node. I think this should be fixed.

Shall i just rename them, or add "used"-values and fix the "free" values, or add "used" and leave "free" alone for some grace period?

Regards, Uwe

UweOhse avatar Apr 28 '19 09:04 UweOhse

thanks for reporting this - can you share your pve version? I would say create / add "used" and keep the "free" for now.

wakeful avatar Apr 30 '19 21:04 wakeful

We're using PVE v6.1. I ran into this myself. Does not help that the "mem" metric appears to be undocumented.

pvesh get /nodes/${name}/lxc --output-format json reports "[{"maxmem": 36507222016, "mem": 571985920,}] or 1.6% .

Looking from inside the LXC with cat /proc/meminfo |perl -ne '/MemFree:\s*(\d+)/ and $f=$1; /MemAvailable:\s*(\d+)/ and $a=$1; /MemTotal:\s*(\d+)/ and $t=$1; END{ printf("Avail %.3f\nFree: %.3f\n",($a/$t),($f/$t)); }' I get 98.4 available, the inverse of 1.6%. This leads me to believe the "mem" metric reported by PVE is "memory in-use" not "memfree".

mozai avatar Jun 01 '20 20:06 mozai