To see the CPU, memory, disk i/o and network i/o statistics for containers, use the docker stats command. The syntax for the command is as follows:
docker stats [OPTIONS] [CONTAINER...]
You can limit the statistics measure to one or more specific containers by specifying a list of container IDs or names separated by a space. By default, if no containers are specified, the command will display statistics for all running containers, as you can see on the following screenshot:
The docker stats command accepts options, which can include:
- --no-stream: This will disable streaming stats and only pull the first result
- -a (--all): This ...