Multiple fixes to 'docker stats' output:

* Add space between values in docker stats output for easier parsing

  Old output could not be parsed easily because there were columns
  that did not have any separator. Also values that are together
  without any space is difficult to read even for humans.

* Update unit.HumanSize comment to match what the does actually does

Signed-off-by: Otto Kekäläinen <otto@seravo.fi>
This commit is contained in:
Otto Kekäläinen 2015-07-29 14:12:57 +03:00 committed by Tibor Vass
parent 48ad74a01c
commit ab0de17526
2 changed files with 7 additions and 8 deletions

View File

@ -21,9 +21,9 @@ weight=1
Running `docker stats` on multiple containers
$ docker stats redis1 redis2
CONTAINER CPU % MEM USAGE/LIMIT MEM % NET I/O
redis1 0.07% 796 KB/64 MB 1.21% 788 B/648 B
redis2 0.07% 2.746 MB/64 MB 4.29% 1.266 KB/648 B
CONTAINER CPU % MEM USAGE / LIMIT MEM % NET I/O
redis1 0.07% 796 KB / 64 MB 1.21% 788 B / 648 B
redis2 0.07% 2.746 MB / 64 MB 4.29% 1.266 KB / 648 B
The `docker stats` command will only return a live stream of data for running
@ -31,4 +31,4 @@ containers. Stopped containers will not return any data.
> **Note:**
> If you want more detailed information about a container's resource
> usage, use the API endpoint.
> usage, use the API endpoint.

View File

@ -25,7 +25,6 @@ Display a live stream of one or more containers' resource usage statistics
Run **docker stats** with multiple containers.
$ docker stats redis1 redis2
CONTAINER CPU % MEM USAGE/LIMIT MEM % NET I/O
redis1 0.07% 796 KB/64 MB 1.21% 788 B/648 B
redis2 0.07% 2.746 MB/64 MB 4.29% 1.266 KB/648 B
CONTAINER CPU % MEM USAGE / LIMIT MEM % NET I/O
redis1 0.07% 796 KB / 64 MB 1.21% 788 B / 648 B
redis2 0.07% 2.746 MB / 64 MB 4.29% 1.266 KB / 648 B