1

I acknowledge that besides an amount of CPU used by container alone, there is a marginal CPU used by other Docker services such as Dockerd, Docker-client, Containerd. But how can I measure them?

I can track down these processes using Top which showed that Dockerd CPU usage jump up or jump down unpredictable.

Moreover, it seems the more number of containers I run, the bigger CPU usage by Dockerd.

If so, is there an approximate number of Dockerd CPU usage per container?

or could anyone show me a way to measure them properly?

PS: I know docker-stats could give us some resources parameter including CPU, but it doesn't show CPu usage by Dockerd and Docker-client, or I am mistaken?

hoango27
  • 89
  • 3
  • 11
  • have you tried **docker stats** command. Other than this there are many ways based on **prometheus** and **Cdvisor**. Check for all those keywords and see which works better for you based on use-case. – Akshay barahate May 13 '19 at 07:11
  • try "docker stats" it will give you data for all running containers. – MyTwoCents May 13 '19 at 07:11
  • i know about docker-stats, thanks anyway. But imo, it just shows you how much cpu used by container alone, not about other services like dockerd, etc. – hoango27 May 13 '19 at 07:12
  • 1
    You watch the CPU consumption of every process you want with something like this: [Retrieve CPU usage and memory usage of a single process on Linux?](https://stackoverflow.com/questions/1221555/retrieve-cpu-usage-and-memory-usage-of-a-single-process-on-linux). Another interesting place to look is `/proc//stat`. – tgogos May 13 '19 at 07:56

0 Answers0