mirror of
https://github.com/docker/compose.git
synced 2026-11-17 21:57:19 +00:00
`docker compose stats` only reports on a single project. Add two
opt-in flags, the default behavior being unchanged:
--all-projects one line per container for every project, with a
PROJECT column
--aggregate one line per project, summing the resource usage of
its containers; alone, it reports on the current
project
Both support the `table` and `json` formats, the latter printing one
object per line like `docker stats`. Unless `--no-stream` is set, they
refresh 2s after each sample. They cannot be combined with a SERVICE,
and `--all-projects` cannot be combined with `--project-name`.
docker/cli does not export its stats collection, so containers are
sampled through the Engine API and the figures computed the same way
`docker stats` does.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Guillaume Lours <glours@users.noreply.github.com>
93 lines
2.8 KiB
YAML
93 lines
2.8 KiB
YAML
command: docker compose stats
|
|
short: Display a live stream of container(s) resource usage statistics
|
|
long: Display a live stream of container(s) resource usage statistics
|
|
usage: docker compose stats [OPTIONS] [SERVICE]
|
|
pname: docker compose
|
|
plink: docker_compose.yaml
|
|
options:
|
|
- option: aggregate
|
|
value_type: bool
|
|
default_value: "false"
|
|
description: |
|
|
Show one line per project, summing the resource usage of its containers (only 'table' and 'json' formats)
|
|
deprecated: false
|
|
hidden: false
|
|
experimental: false
|
|
experimentalcli: false
|
|
kubernetes: false
|
|
swarm: false
|
|
- option: all
|
|
shorthand: a
|
|
value_type: bool
|
|
default_value: "false"
|
|
description: Show all containers (default shows just running)
|
|
deprecated: false
|
|
hidden: false
|
|
experimental: false
|
|
experimentalcli: false
|
|
kubernetes: false
|
|
swarm: false
|
|
- option: all-projects
|
|
value_type: bool
|
|
default_value: "false"
|
|
description: |
|
|
Show the containers of all projects instead of the current one, with their project (only 'table' and 'json' formats)
|
|
deprecated: false
|
|
hidden: false
|
|
experimental: false
|
|
experimentalcli: false
|
|
kubernetes: false
|
|
swarm: false
|
|
- option: format
|
|
value_type: string
|
|
description: |-
|
|
Format output using a custom template:
|
|
'table': Print output in table format with column headers (default)
|
|
'table TEMPLATE': Print output in table format using the given Go template
|
|
'json': Print in JSON format
|
|
'TEMPLATE': Print output using the given Go template.
|
|
Refer to https://docs.docker.com/engine/cli/formatting/ for more information about formatting output with templates
|
|
deprecated: false
|
|
hidden: false
|
|
experimental: false
|
|
experimentalcli: false
|
|
kubernetes: false
|
|
swarm: false
|
|
- option: no-stream
|
|
value_type: bool
|
|
default_value: "false"
|
|
description: Disable streaming stats and only pull the first result
|
|
deprecated: false
|
|
hidden: false
|
|
experimental: false
|
|
experimentalcli: false
|
|
kubernetes: false
|
|
swarm: false
|
|
- option: no-trunc
|
|
value_type: bool
|
|
default_value: "false"
|
|
description: Do not truncate output
|
|
deprecated: false
|
|
hidden: false
|
|
experimental: false
|
|
experimentalcli: false
|
|
kubernetes: false
|
|
swarm: false
|
|
inherited_options:
|
|
- option: dry-run
|
|
value_type: bool
|
|
default_value: "false"
|
|
description: Execute command in dry run mode
|
|
deprecated: false
|
|
hidden: false
|
|
experimental: false
|
|
experimentalcli: false
|
|
kubernetes: false
|
|
swarm: false
|
|
deprecated: false
|
|
hidden: false
|
|
experimental: false
|
|
experimentalcli: false
|
|
kubernetes: false
|
|
swarm: false
|
|
|