Tuesday, 30 October 2018

Memory and CPU Usage for All Your Docker Containers on Ubuntu


Running docker stats command will return statistics of your running container. Stats like CPU, memory network and block i/o operations.

How to look stats of specific container?

For example: 

docker stats  ${container Id or container name}.

command: docker stats chat.






above command will continouslly update the stats

How to look stats of all containers?

Command:  docker stats 

above command will display stats of all running containers with continouslly update the stats.



In case if you don't want stats to be updated continously, then add --no-stream

in docker stats command this will display stats only once.


For example:  docker stats -no-stream or docker stats ${container name | id} --no-stream.


No comments:

Post a Comment

Generating Unique Id in Distributed Environment in high Scale:

Recently I was working on a project which requires unique id in a distributed environment which we used as a  primary  key to store in dat...