docker container stats

Estimated reading time: 4 minutes

Description

Display a live stream of container(s) resource usage statistics

Usage

docker container stats [OPTIONS] [CONTAINER...]

Options

Name, shorthand Default Description
--all, -a false Show all containers (default shows just running)
--format   Pretty-print images using a Go template
--no-stream false Disable streaming stats and only pull the first result

Parent command

Command Description
docker container Manage containers
Command Description
docker container attach Attach to a running container
docker container commit Create a new image from a container’s changes
docker container cp Copy files/folders between a container and the local filesystem
docker container create Create a new container
docker container diff Inspect changes to files or directories on a container’s filesystem
docker container exec Run a command in a running container
docker container export Export a container’s filesystem as a tar archive
docker container inspect Display detailed information on one or more containers
docker container kill Kill one or more running containers
docker container logs Fetch the logs of a container
docker container ls List containers
docker container pause Pause all processes within one or more containers
docker container port List port mappings or a specific mapping for the container
docker container prune Remove all stopped containers
docker container rename Rename a container
docker container restart Restart one or more containers
docker container rm Remove one or more containers
docker container run Run a command in a new container
docker container start Start one or more stopped containers
docker container stats Display a live stream of container(s) resource usage statistics
docker container stop Stop one or more running containers
docker container top Display the running processes of a container
docker container unpause Unpause all processes within one or more containers
docker container update Update configuration of one or more containers
docker container wait Block until one or more containers stop, then print their exit codes

Extended description

Display a live stream of one or more containers’ resource usage statistics

Format

Pretty-print containers statistics using a Go template. Valid placeholders: .Container - Container name or ID. .Name - Container name. .ID - Container ID. .CPUPerc - CPU percentage. .MemUsage - Memory usage. .NetIO - Network IO. .BlockIO - Block IO. .MemPerc - Memory percentage (Not available on Windows). .PIDs - Number of PIDs (Not available on Windows).

EXAMPLES

Running docker container stats on all running containers

$ docker container stats
CONTAINER           CPU %!M(MISSING)EM USAGE / LIMIT     MEM %!N(MISSING)ET I/O             BLOCK I/O
1285939c1fd3        0.07%! (MISSING)KiB / 64 MiB        1.21%! (MISSING)B / 648 B       3.568 MB / 512 KB
9c76f7834ae2        0.07%! (MISSING)MiB / 64 MiB      4.29%! (MISSING)KB / 648 B    12.4 MB / 0 B
d1ea048f04e4        0.03%! (MISSING)MiB / 64 MiB      6.30%! (MISSING)KB / 648 B    27.7 MB / 0 B

Running docker container stats on multiple containers by name and id.

$ docker container stats fervent_panini 5acfcb1b4fd1
CONTAINER           CPU %!M(MISSING)EM USAGE/LIMIT     MEM %!N(MISSING)ET I/O
5acfcb1b4fd1        0.00%! (MISSING)MiB/1.045 GiB   11.03%! (MISSING)kB/648 B
fervent_panini      0.02%! (MISSING)MiB/1.045 GiB   1.06%! (MISSING)B/648 B

Examples

Running docker container stats on all running containers

$ docker container stats
CONTAINER           CPU %               MEM USAGE / LIMIT     MEM %               NET I/O             BLOCK I/O
1285939c1fd3        0.07%               796 KiB / 64 MiB        1.21%               788 B / 648 B       3.568 MB / 512 KB
9c76f7834ae2        0.07%               2.746 MiB / 64 MiB      4.29%               1.266 KB / 648 B    12.4 MB / 0 B
d1ea048f04e4        0.03%               4.583 MiB / 64 MiB      6.30%               2.854 KB / 648 B    27.7 MB / 0 B

Running docker container stats on multiple containers by name and id.

$ docker container stats fervent_panini 5acfcb1b4fd1
CONTAINER           CPU %               MEM USAGE/LIMIT     MEM %               NET I/O
5acfcb1b4fd1        0.00%               115.2 MiB/1.045 GiB   11.03%              1.422 kB/648 B
fervent_panini      0.02%               11.08 MiB/1.045 GiB   1.06%               648 B/648 B
chat icon Feedback? Suggestions? Can't find something in the docs?
Edit this page Request docs changes Get support
Rate this page: