How do you check the amount of resources (CPU, memory etc) being used by each Docker container that is running on the (Ubuntu) server?
you have docker stats
see the doc
http://docs.docker.com/reference/commandline/stats/
for example you can do
docker stats $(docker ps -q)
(that will display the id of the containers or if you want the name, see
Is there any way to display container names in docker stats?
, you can also you docker top
if you are interested in a specific container
http://docs.docker.com/reference/commandline/top/
this displays real-time resource usage across all running containers on a single docker engine or entire swarm cluster
docker stats $( docker ps --format '{{ .Names }}' )
sample output
CONTAINER CPU % MEM USAGE / LIMIT MEM % NET I/O BLOCK I/O PIDS
dockercoins_webui_1 0.66% 19.23 MB / 16.72 GB 0.12% 309.8 kB / 605.8 kB 61.44 kB / 0 B 9
dockercoins_worker_1 4.01% 13.18 MB / 16.72 GB 0.08% 834.5 kB / 920.5 kB 98.3 kB / 0 B 1
dockercoins_rng_1 0.70% 19.03 MB / 16.72 GB 0.11% 412.8 kB / 441.7 kB 2.388 MB / 0 B 1
dockercoins_hasher_1 0.59% 19.67 MB / 16.72 GB 0.12% 477.6 kB / 372.7 kB 1.438 MB / 0 B 22
dockercoins_redis_1 0.18% 6.877 MB / 16.72 GB 0.04% 178.8 kB / 80.11 kB 5.771 MB / 0 B 3
web 0.02% 11.06 MB / 16.72 GB 0.07% 87.19 kB / 648 B 0 B / 0 B 1
db 0.01% 14.11 MB / 16.72 GB 0.08% 87.84 kB / 648 B 0 B / 9.851 MB 7
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With