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.
Best Answer
Give Cadvisor a try. The interface is pretty basic, but it has everything you are looking for.