mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Update to docker stats documentation
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
parent
f3aed2a297
commit
db9b1e3654
6 changed files with 11 additions and 12 deletions
|
@ -2688,7 +2688,7 @@ func (s *containerStats) Display(w io.Writer) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (cli *DockerCli) CmdStats(args ...string) error {
|
func (cli *DockerCli) CmdStats(args ...string) error {
|
||||||
cmd := cli.Subcmd("stats", "CONTAINER", "Display live container stats based on resource usage", true)
|
cmd := cli.Subcmd("stats", "CONTAINER", "Display a live stream of one or more containers' resource usage statistics", true)
|
||||||
cmd.Require(flag.Min, 1)
|
cmd.Require(flag.Min, 1)
|
||||||
utils.ParseFlags(cmd, args, true)
|
utils.ParseFlags(cmd, args, true)
|
||||||
|
|
||||||
|
|
|
@ -98,7 +98,7 @@ func init() {
|
||||||
{"save", "Save an image to a tar archive"},
|
{"save", "Save an image to a tar archive"},
|
||||||
{"search", "Search for an image on the Docker Hub"},
|
{"search", "Search for an image on the Docker Hub"},
|
||||||
{"start", "Start a stopped container"},
|
{"start", "Start a stopped container"},
|
||||||
{"stats", "Display live container stats based on resource usage"},
|
{"stats", "Display a live stream of one or more containers' resource usage statistics"},
|
||||||
{"stop", "Stop a running container"},
|
{"stop", "Stop a running container"},
|
||||||
{"tag", "Tag an image into a repository"},
|
{"tag", "Tag an image into a repository"},
|
||||||
{"top", "Lookup the running processes of a container"},
|
{"top", "Lookup the running processes of a container"},
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
% Docker Community
|
% Docker Community
|
||||||
% JUNE 2014
|
% JUNE 2014
|
||||||
# NAME
|
# NAME
|
||||||
docker-stats - Display live container stats based on resource usage.
|
docker-stats - Display a live stream of one or more containers' resource usage statistics
|
||||||
|
|
||||||
# SYNOPSIS
|
# SYNOPSIS
|
||||||
**docker stats**
|
**docker stats**
|
||||||
|
@ -11,7 +11,7 @@ docker-stats - Display live container stats based on resource usage.
|
||||||
|
|
||||||
# DESCRIPTION
|
# DESCRIPTION
|
||||||
|
|
||||||
Display live container stats based on resource usage.
|
Display a live stream of one or more containers' resource usage statistics
|
||||||
|
|
||||||
# OPTIONS
|
# OPTIONS
|
||||||
**--help**
|
**--help**
|
||||||
|
|
|
@ -71,7 +71,7 @@ root filesystem as read only.
|
||||||
`GET /containers/(id)/stats`
|
`GET /containers/(id)/stats`
|
||||||
|
|
||||||
**New!**
|
**New!**
|
||||||
This endpoint returns a stream of container stats based on resource usage.
|
This endpoint returns a live stream of a container's resource usage statistics.
|
||||||
|
|
||||||
|
|
||||||
## v1.16
|
## v1.16
|
||||||
|
|
|
@ -518,7 +518,7 @@ Status Codes:
|
||||||
|
|
||||||
`GET /containers/(id)/stats`
|
`GET /containers/(id)/stats`
|
||||||
|
|
||||||
Returns a stream of json objects of the container's stats
|
This endpoint returns a live stream of a container's resource usage statistics.
|
||||||
|
|
||||||
**Example request**:
|
**Example request**:
|
||||||
|
|
||||||
|
|
|
@ -2005,11 +2005,11 @@ more details on finding shared images from the command line.
|
||||||
|
|
||||||
Usage: docker stats [CONTAINERS]
|
Usage: docker stats [CONTAINERS]
|
||||||
|
|
||||||
Display live container stats based on resource usage
|
Display a live stream of one or more containers' resource usage statistics
|
||||||
|
|
||||||
--help=false Print usage
|
--help=false Print usage
|
||||||
|
|
||||||
Running `docker stats` on two redis containers
|
Running `docker stats` on multiple containers
|
||||||
|
|
||||||
$ sudo docker stats redis1 redis2
|
$ sudo docker stats redis1 redis2
|
||||||
CONTAINER CPU % MEM USAGE/LIMIT MEM % NET I/O
|
CONTAINER CPU % MEM USAGE/LIMIT MEM % NET I/O
|
||||||
|
@ -2017,12 +2017,11 @@ Running `docker stats` on two redis containers
|
||||||
redis2 0.07% 2.746 MiB/64 MiB 4.29% 1.266 KiB/648 B
|
redis2 0.07% 2.746 MiB/64 MiB 4.29% 1.266 KiB/648 B
|
||||||
|
|
||||||
|
|
||||||
When run on running containers live container stats will be streamed
|
The `docker stats` command will only return a live stream of data for running
|
||||||
back and displayed to the client. Stopped containers will not
|
containers. Stopped containers will not return any data.
|
||||||
receive any updates to their stats unless the container is started again.
|
|
||||||
|
|
||||||
> **Note:**
|
> **Note:**
|
||||||
> If you want more in depth resource usage for a container use the API endpoint
|
> If you want more detailed information about a container's resource usage, use the API endpoint.
|
||||||
|
|
||||||
## stop
|
## stop
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue