Open shubhindia opened 2 years ago
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.
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 returning236447424512
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 of236447424512