I want to analyze the maximum memory (RAM + swap) usage and the maximum cpu utilization of a single docker container.

I know that one can use docker stats and /sys/fs/cgroup/memory/docker//memory.stat (and the corresponding cpu pseudo-file) to get live information, but fetching this information every few ms does not seem a good way to go to look for peaks.

Is there any way to achieve this? I'm using Ubuntu 16.04 LTS and 1.11.2 on my host.


Give Cadvisor a try. The interface is pretty basic, but it has everything you are looking for.

| improve this answer | |

There is more monitoring tools for Docker, not only cAdvisor - http://veggiemonk.github.io/awesome-docker/#monitoring

But all of them read metric value for period, which is usually >1sec. If you need to monitor peaks with ms resolution, then you need to code your own solution.

TBH: 1 sec metric resolution is enough for 99% (non realtime) applications.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.