Docker memory usage is incorrect
Describe the bug
Docker memory usage is incorrect, while comparing the glances and the docker stats command at the same time.
To Reproduce Steps to reproduce the behavior:
- Open Glances webUI
- Run the
docker statscommand - Compare the memory usage of any docker container
Expected behavior It should be the same or very similar.
Screenshots
Environement (please complete the following information)
- Operating System: Debian 12, Docker image from nicolargo/glances (latest)
- Glances & psutil versions: v3.4.0.3
- How do you install Glances: Docker
Glances displays the stats returned by the https://github.com/docker/docker-py library.
As you can see in this screenshot, the Glances value (1.55 MB is ~ to the one given by Docker-Py 1.6 MB). Do not know what is the value returned by "docker stats"...
I just open an issue on the upper lib: https://github.com/docker/docker-py/issues/3210
Thank you!
Have to algorithm inside Glances because Docker-Py return the stats "as it".
So the following computation will be added under the wood: usage - inactive_file.
Branch 2637-docker-memory-usage-is-incorrect to be tested and merged into develop.