0

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.

stambata
  • 1,598
  • 3
  • 13
  • 18
muffel
  • 302
  • 7
  • 20

2 Answers2

2

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.

Jan Garaj
  • 869
  • 1
  • 7
  • 15
1

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

Michael
  • 126
  • 2