2015-06-21 16:41:38 -04:00
<!-- [metadata]>
+++
title = "stats"
description = "The stats command description and usage"
keywords = ["container, resource, statistics"]
[menu.main]
parent = "smn_cli"
+++
<![end-metadata]-->
# stats
2015-10-03 08:53:25 -04:00
Usage: docker stats [OPTIONS] [CONTAINER...]
2015-06-21 16:41:38 -04:00
Display a live stream of one or more containers' resource usage statistics
2015-12-23 09:37:06 -05:00
-a, --all Show all containers (default shows just running)
--help Print usage
--no-stream Disable streaming stats and only pull the first result
2015-06-21 16:41:38 -04:00
2015-10-03 08:53:25 -04:00
The `docker stats` command returns a live data stream for running containers. To limit data to one or more specific containers, specify a list of container names or ids separated by a space. You can specify a stopped container but stopped containers do not return any data.
2015-06-21 16:41:38 -04:00
2015-10-03 08:53:25 -04:00
If you want more detailed information about a container's resource usage, use the `/containers/(id)/stats` API endpoint.
## Examples
Running `docker stats` on all running containers
$ docker stats
2015-07-26 04:14:00 -04:00
CONTAINER CPU % MEM USAGE / LIMIT MEM % NET I/O BLOCK I/O
redis1 0.07% 796 KB / 64 MB 1.21% 788 B / 648 B 3.568 MB / 512 KB
redis2 0.07% 2.746 MB / 64 MB 4.29% 1.266 KB / 648 B 12.4 MB / 0 B
2015-10-03 08:53:25 -04:00
nginx1 0.03% 4.583 MB / 64 MB 6.30% 2.854 KB / 648 B 27.7 MB / 0 B
2015-06-21 16:41:38 -04:00
2015-10-03 08:53:25 -04:00
Running `docker stats` on multiple containers by name and id.
2015-06-21 16:41:38 -04:00
2015-10-03 08:53:25 -04:00
$ docker stats fervent_panini 5acfcb1b4fd1
CONTAINER CPU % MEM USAGE/LIMIT MEM % NET I/O
5acfcb1b4fd1 0.00% 115.2 MB/1.045 GB 11.03% 1.422 kB/648 B
fervent_panini 0.02% 11.08 MB/1.045 GB 1.06% 648 B/648 B