Getting wrong values for a kubernetes pod
Describe the bug
I am using gopsutil to get CPU, memory and load usage for a particular pod (This is part of an internal logger). So when we use this (logger) in our CI (which is in kubernetes), instead of reporting the pod CPU and memory, it is reporting values for the node on which the pod is running.
For e.g.
We have a job which runs in a container which has 32GB memory, so it should return total memory as 34,359,738,368 bytes but instead it is returning 236447424512 which is around 236GB and this is node memory not the memory which was allocated to the pod.
Expected behavior
It should return 34,359,738,368 instead of 236447424512
Does this library plan to address this issue so that it can correctly calculate this for k8s pods or is this likely to stay the same?
Any update here?
This issue still exists now
Yes, I have an idea around this, will try it out once I get some free time.