From 9ba034293d28970734755d510a2df41290b8176d Mon Sep 17 00:00:00 2001 From: Ed Santiago Date: Wed, 14 Sep 2022 13:05:32 -0600 Subject: Man pages: refactor common options: 2 stats opts --no-reset and --no-stream, in podman-stats and pod-stats. Very minor tweak to --no-stream to account for pods. Signed-off-by: Ed Santiago --- docs/source/markdown/.gitignore | 2 + docs/source/markdown/options/no-reset.md | 3 + docs/source/markdown/options/no-stream.md | 3 + docs/source/markdown/podman-pod-stats.1.md | 92 -------------------- docs/source/markdown/podman-pod-stats.1.md.in | 88 +++++++++++++++++++ docs/source/markdown/podman-stats.1.md | 121 -------------------------- docs/source/markdown/podman-stats.1.md.in | 117 +++++++++++++++++++++++++ 7 files changed, 213 insertions(+), 213 deletions(-) create mode 100644 docs/source/markdown/options/no-reset.md create mode 100644 docs/source/markdown/options/no-stream.md delete mode 100644 docs/source/markdown/podman-pod-stats.1.md create mode 100644 docs/source/markdown/podman-pod-stats.1.md.in delete mode 100644 docs/source/markdown/podman-stats.1.md create mode 100644 docs/source/markdown/podman-stats.1.md.in diff --git a/docs/source/markdown/.gitignore b/docs/source/markdown/.gitignore index 69911b5b8..af4c5360b 100644 --- a/docs/source/markdown/.gitignore +++ b/docs/source/markdown/.gitignore @@ -20,6 +20,7 @@ podman-pod-kill.1.md podman-pod-logs.1.md podman-pod-rm.1.md podman-pod-start.1.md +podman-pod-stats.1.md podman-pod-stop.1.md podman-pull.1.md podman-push.1.md @@ -27,6 +28,7 @@ podman-rm.1.md podman-run.1.md podman-search.1.md podman-start.1.md +podman-stats.1.md podman-stop.1.md podman-unpause.1.md podman-update.1.md diff --git a/docs/source/markdown/options/no-reset.md b/docs/source/markdown/options/no-reset.md new file mode 100644 index 000000000..ce5b95057 --- /dev/null +++ b/docs/source/markdown/options/no-reset.md @@ -0,0 +1,3 @@ +#### **--no-reset** + +Do not clear the terminal/screen in between reporting intervals diff --git a/docs/source/markdown/options/no-stream.md b/docs/source/markdown/options/no-stream.md new file mode 100644 index 000000000..a9d548ba0 --- /dev/null +++ b/docs/source/markdown/options/no-stream.md @@ -0,0 +1,3 @@ +#### **--no-stream** + +Disable streaming <<|pod >>stats and only pull the first result, default setting is false diff --git a/docs/source/markdown/podman-pod-stats.1.md b/docs/source/markdown/podman-pod-stats.1.md deleted file mode 100644 index c71159f09..000000000 --- a/docs/source/markdown/podman-pod-stats.1.md +++ /dev/null @@ -1,92 +0,0 @@ -% podman-pod-stats 1 - -## NAME -podman\-pod\-stats - Display a live stream of resource usage stats for containers in one or more pods - -## SYNOPSIS -**podman pod stats** [*options*] [*pod*] - -## DESCRIPTION -Display a live stream of containers in one or more pods resource usage statistics. Running rootless is only supported on cgroups v2. - -## OPTIONS - -#### **--all**, **-a** - -Show all containers. Only running containers are shown by default - -#### **--format**=*template* - -Pretty-print container statistics to JSON or using a Go template - -Valid placeholders for the Go template are listed below: - -| **Placeholder** | **Description** | -| --------------- | ------------------ | -| .Pod | Pod ID | -| .CID | Container ID | -| .Name | Container Name | -| .CPU | CPU percentage | -| .MemUsage | Memory usage | -| .MemUsageBytes | Memory usage (IEC) | -| .Mem | Memory percentage | -| .NetIO | Network IO | -| .BlockIO | Block IO | -| .PIDS | Number of PIDs | - -When using a GO template, you may precede the format with `table` to print headers. - -#### **--latest**, **-l** - -Instead of providing the pod name or ID, use the last created pod. (This option is not available with the remote Podman client, including Mac and Windows (excluding WSL2) machines) - -#### **--no-reset** - -Do not clear the terminal/screen in between reporting intervals - -#### **--no-stream** - -Disable streaming pod stats and only pull the first result, default setting is false - -## EXAMPLE - -``` -# podman pod stats -a --no-stream -ID NAME CPU % MEM USAGE / LIMIT MEM % NET IO BLOCK IO PIDS -a9f807ffaacd frosty_hodgkin -- 3.092MB / 16.7GB 0.02% -- / -- -- / -- 2 -3b33001239ee sleepy_stallman -- -- / -- -- -- / -- -- / -- -- -``` - -``` -# podman pod stats --no-stream a9f80 -ID NAME CPU % MEM USAGE / LIMIT MEM % NET IO BLOCK IO PIDS -a9f807ffaacd frosty_hodgkin -- 3.092MB / 16.7GB 0.02% -- / -- -- / -- 2 -``` - -``` -# podman pod stats --no-stream --format=json a9f80 -[ - { - "id": "a9f807ffaacd", - "name": "frosty_hodgkin", - "cpu_percent": "--", - "mem_usage": "3.092MB / 16.7GB", - "mem_percent": "0.02%", - "netio": "-- / --", - "blocki": "-- / --", - "pids": "2" - } -] -``` - -``` -# podman pod stats --no-stream --format "table {{.ID}} {{.Name}} {{.MemUsage}}" 6eae -ID NAME MEM USAGE / LIMIT -6eae9e25a564 clever_bassi 3.031MB / 16.7GB -``` - -## SEE ALSO -**[podman(1)](podman.1.md)**, **[podman-pod(1)](podman-pod.1.md)** - -## HISTORY -February 2019, Originally compiled by Dan Walsh diff --git a/docs/source/markdown/podman-pod-stats.1.md.in b/docs/source/markdown/podman-pod-stats.1.md.in new file mode 100644 index 000000000..83a4b7a1e --- /dev/null +++ b/docs/source/markdown/podman-pod-stats.1.md.in @@ -0,0 +1,88 @@ +% podman-pod-stats 1 + +## NAME +podman\-pod\-stats - Display a live stream of resource usage stats for containers in one or more pods + +## SYNOPSIS +**podman pod stats** [*options*] [*pod*] + +## DESCRIPTION +Display a live stream of containers in one or more pods resource usage statistics. Running rootless is only supported on cgroups v2. + +## OPTIONS + +#### **--all**, **-a** + +Show all containers. Only running containers are shown by default + +#### **--format**=*template* + +Pretty-print container statistics to JSON or using a Go template + +Valid placeholders for the Go template are listed below: + +| **Placeholder** | **Description** | +| --------------- | ------------------ | +| .Pod | Pod ID | +| .CID | Container ID | +| .Name | Container Name | +| .CPU | CPU percentage | +| .MemUsage | Memory usage | +| .MemUsageBytes | Memory usage (IEC) | +| .Mem | Memory percentage | +| .NetIO | Network IO | +| .BlockIO | Block IO | +| .PIDS | Number of PIDs | + +When using a GO template, you may precede the format with `table` to print headers. + +#### **--latest**, **-l** + +Instead of providing the pod name or ID, use the last created pod. (This option is not available with the remote Podman client, including Mac and Windows (excluding WSL2) machines) + +@@option no-reset + +@@option no-stream + +## EXAMPLE + +``` +# podman pod stats -a --no-stream +ID NAME CPU % MEM USAGE / LIMIT MEM % NET IO BLOCK IO PIDS +a9f807ffaacd frosty_hodgkin -- 3.092MB / 16.7GB 0.02% -- / -- -- / -- 2 +3b33001239ee sleepy_stallman -- -- / -- -- -- / -- -- / -- -- +``` + +``` +# podman pod stats --no-stream a9f80 +ID NAME CPU % MEM USAGE / LIMIT MEM % NET IO BLOCK IO PIDS +a9f807ffaacd frosty_hodgkin -- 3.092MB / 16.7GB 0.02% -- / -- -- / -- 2 +``` + +``` +# podman pod stats --no-stream --format=json a9f80 +[ + { + "id": "a9f807ffaacd", + "name": "frosty_hodgkin", + "cpu_percent": "--", + "mem_usage": "3.092MB / 16.7GB", + "mem_percent": "0.02%", + "netio": "-- / --", + "blocki": "-- / --", + "pids": "2" + } +] +``` + +``` +# podman pod stats --no-stream --format "table {{.ID}} {{.Name}} {{.MemUsage}}" 6eae +ID NAME MEM USAGE / LIMIT +6eae9e25a564 clever_bassi 3.031MB / 16.7GB +``` + +## SEE ALSO +**[podman(1)](podman.1.md)**, **[podman-pod(1)](podman-pod.1.md)** + +## HISTORY +February 2019, Originally compiled by Dan Walsh diff --git a/docs/source/markdown/podman-stats.1.md b/docs/source/markdown/podman-stats.1.md deleted file mode 100644 index a1a0f6a93..000000000 --- a/docs/source/markdown/podman-stats.1.md +++ /dev/null @@ -1,121 +0,0 @@ -% podman-stats 1 - -## NAME -podman\-stats - Display a live stream of one or more container's resource usage statistics - -## SYNOPSIS -**podman stats** [*options*] [*container*] - -**podman container stats** [*options*] [*container*] - -## DESCRIPTION -Display a live stream of one or more containers' resource usage statistics - -Note: Podman stats will not work in rootless environments that use CGroups V1. -Podman stats relies on CGroup information for statistics, and CGroup v1 is not -supported for rootless use cases. - -Note: Rootless environments that use CGroups V2 are not able to report statistics -about their networking usage. - -## OPTIONS - -#### **--all**, **-a** - -Show all containers. Only running containers are shown by default - -#### **--format**=*template* - -Pretty-print container statistics to JSON or using a Go template - -Valid placeholders for the Go template are listed below: - -| **Placeholder** | **Description** | -| --------------- | ------------------ | -| .ID | Container ID | -| .Name | Container Name | -| .CPUPerc | CPU percentage | -| .MemUsage | Memory usage | -| .MemUsageBytes | Memory usage (IEC) | -| .MemPerc | Memory percentage | -| .NetIO | Network IO | -| .BlockIO | Block IO | -| .PIDS | Number of PIDs | - -When using a GO template, you may precede the format with `table` to print headers. - -#### **--interval**, **-i**=*seconds* - -Time in seconds between stats reports, defaults to 5 seconds. - -#### **--latest**, **-l** - -Instead of providing the container name or ID, use the last created container. If you use methods other than Podman -to run containers such as CRI-O, the last started container could be from either of those methods. (This option is not available with the remote Podman client, including Mac and Windows (excluding WSL2) machines) - -#### **--no-reset** - -Do not clear the terminal/screen in between reporting intervals - -#### **--no-stream** - -Disable streaming stats and only pull the first result, default setting is false - -#### **--no-trunc** - -Do not truncate output - -## EXAMPLE - -``` -# podman stats -a --no-stream -ID NAME CPU % MEM USAGE / LIMIT MEM % NET IO BLOCK IO PIDS -a9f807ffaacd frosty_hodgkin -- 3.092MB / 16.7GB 0.02% -- / -- -- / -- 2 -3b33001239ee sleepy_stallman -- -- / -- -- -- / -- -- / -- -- -``` - -``` -# podman stats --no-stream a9f80 -ID NAME CPU % MEM USAGE / LIMIT MEM % NET IO BLOCK IO PIDS -a9f807ffaacd frosty_hodgkin -- 3.092MB / 16.7GB 0.02% -- / -- -- / -- 2 -``` - -``` -$ podman stats --no-trunc 3667 --format 'table {{ .ID }} {{ .MemUsage }}' -ID MEM USAGE / LIMIT -3667c6aacb06aac2eaffce914c01736420023d56ef9b0f4cfe58b6d6a78b7503 49.15kB / 67.17GB -``` - -``` -# podman stats --no-stream --format=json a9f80 -[ - { - "id": "a9f807ffaacd", - "name": "frosty_hodgkin", - "cpu_percent": "--", - "mem_usage": "3.092MB / 16.7GB", - "mem_percent": "0.02%", - "netio": "-- / --", - "blocki": "-- / --", - "pids": "2" - } -] -``` - -``` -# podman stats --no-stream --format "table {{.ID}} {{.Name}} {{.MemUsage}}" 6eae -ID NAME MEM USAGE / LIMIT -6eae9e25a564 clever_bassi 3.031MB / 16.7GB -``` - -Note: When using a slirp4netns network with the rootlesskit port -handler, the traffic send via the port forwarding will be accounted to -the `lo` device. Traffic accounted to `lo` is not accounted in the -stats output. - - -## SEE ALSO -**[podman(1)](podman.1.md)** - -## HISTORY -July 2017, Originally compiled by Ryan Cole diff --git a/docs/source/markdown/podman-stats.1.md.in b/docs/source/markdown/podman-stats.1.md.in new file mode 100644 index 000000000..f06bd3fcc --- /dev/null +++ b/docs/source/markdown/podman-stats.1.md.in @@ -0,0 +1,117 @@ +% podman-stats 1 + +## NAME +podman\-stats - Display a live stream of one or more container's resource usage statistics + +## SYNOPSIS +**podman stats** [*options*] [*container*] + +**podman container stats** [*options*] [*container*] + +## DESCRIPTION +Display a live stream of one or more containers' resource usage statistics + +Note: Podman stats will not work in rootless environments that use CGroups V1. +Podman stats relies on CGroup information for statistics, and CGroup v1 is not +supported for rootless use cases. + +Note: Rootless environments that use CGroups V2 are not able to report statistics +about their networking usage. + +## OPTIONS + +#### **--all**, **-a** + +Show all containers. Only running containers are shown by default + +#### **--format**=*template* + +Pretty-print container statistics to JSON or using a Go template + +Valid placeholders for the Go template are listed below: + +| **Placeholder** | **Description** | +| --------------- | ------------------ | +| .ID | Container ID | +| .Name | Container Name | +| .CPUPerc | CPU percentage | +| .MemUsage | Memory usage | +| .MemUsageBytes | Memory usage (IEC) | +| .MemPerc | Memory percentage | +| .NetIO | Network IO | +| .BlockIO | Block IO | +| .PIDS | Number of PIDs | + +When using a GO template, you may precede the format with `table` to print headers. + +#### **--interval**, **-i**=*seconds* + +Time in seconds between stats reports, defaults to 5 seconds. + +#### **--latest**, **-l** + +Instead of providing the container name or ID, use the last created container. If you use methods other than Podman +to run containers such as CRI-O, the last started container could be from either of those methods. (This option is not available with the remote Podman client, including Mac and Windows (excluding WSL2) machines) + +@@option no-reset + +@@option no-stream + +#### **--no-trunc** + +Do not truncate output + +## EXAMPLE + +``` +# podman stats -a --no-stream +ID NAME CPU % MEM USAGE / LIMIT MEM % NET IO BLOCK IO PIDS +a9f807ffaacd frosty_hodgkin -- 3.092MB / 16.7GB 0.02% -- / -- -- / -- 2 +3b33001239ee sleepy_stallman -- -- / -- -- -- / -- -- / -- -- +``` + +``` +# podman stats --no-stream a9f80 +ID NAME CPU % MEM USAGE / LIMIT MEM % NET IO BLOCK IO PIDS +a9f807ffaacd frosty_hodgkin -- 3.092MB / 16.7GB 0.02% -- / -- -- / -- 2 +``` + +``` +$ podman stats --no-trunc 3667 --format 'table {{ .ID }} {{ .MemUsage }}' +ID MEM USAGE / LIMIT +3667c6aacb06aac2eaffce914c01736420023d56ef9b0f4cfe58b6d6a78b7503 49.15kB / 67.17GB +``` + +``` +# podman stats --no-stream --format=json a9f80 +[ + { + "id": "a9f807ffaacd", + "name": "frosty_hodgkin", + "cpu_percent": "--", + "mem_usage": "3.092MB / 16.7GB", + "mem_percent": "0.02%", + "netio": "-- / --", + "blocki": "-- / --", + "pids": "2" + } +] +``` + +``` +# podman stats --no-stream --format "table {{.ID}} {{.Name}} {{.MemUsage}}" 6eae +ID NAME MEM USAGE / LIMIT +6eae9e25a564 clever_bassi 3.031MB / 16.7GB +``` + +Note: When using a slirp4netns network with the rootlesskit port +handler, the traffic send via the port forwarding will be accounted to +the `lo` device. Traffic accounted to `lo` is not accounted in the +stats output. + + +## SEE ALSO +**[podman(1)](podman.1.md)** + +## HISTORY +July 2017, Originally compiled by Ryan Cole -- cgit v1.2.3-54-g00ecf