Inspecting system resource usage is an efficient way to find misbehaving applications. This example is an equivalent of the traditional top
command for containers:
docker stats
To follow the stats of specific containers, list them on the command line:
docker stats 7786807d8084 7786807d8085
Docker stats displays the following information:
CONTAINER CPU % MEM USAGE / LIMIT MEM % NET I/O BLOCK I/O
7786807d8084 0.65% 1.33 GB / 3.95 GB 33.67% 142.2 MB / 57.79 MB 46.32 MB / 0 B
By default docker stats
displays the id of the containers, and this is not very helpful, if your prefer to display the names of the container, just do
docker stats $(docker ps --format '{{.Names}}')