Skip to content
Advertisement

docker stats shows zero memory usage even for running containers

I have two containers ran by Docker Swarm:

JavaScript

Host OS is Debian Jessie. There are JVM applications in both containers. Why does docker stats show zero memory usage? Should I configure my Java apps somehow to be able to see memory usage in docker stats? Is there some other way to check memory usage?

Advertisement

Answer

It is quite possible that memory cgroup accounting is not enabled in your kernel (which is a common problem that others have hit as well over time on Debian/Ubuntu based installs).

Can you verify with docker info or the output from the daemon that you aren’t seeing messages like the following, nicely summarized in this blog post: Debian Jessie w/Docker? If so, the fix is also listed there, as well as in the GitHub issue I linked in the first sentence. There is also a section in the install documentation about enabling cgroup memory accounting although it only mentions Ubuntu and not Debian.

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement