summaryrefslogtreecommitdiff
path: root/docs/podman-top.1.md
diff options
context:
space:
mode:
authorValentin Rothberg <rothberg@redhat.com>2019-04-29 11:21:55 +0200
committerValentin Rothberg <rothberg@redhat.com>2019-05-03 11:20:16 +0200
commit0d2d52339058a19e66ecc75f78c52596054c7dad (patch)
tree73636772d105d249a996ee145b0afd48fddf16ab /docs/podman-top.1.md
parentd9d9c82184ad6d7e3fad07dfe2e99b158560d3a8 (diff)
downloadpodman-0d2d52339058a19e66ecc75f78c52596054c7dad.tar.gz
podman-0d2d52339058a19e66ecc75f78c52596054c7dad.tar.bz2
podman-0d2d52339058a19e66ecc75f78c52596054c7dad.zip
top: fallback to execing ps(1)
Fallback to executing ps(1) in case we hit an unknown psgo descriptor. This ensures backwards compatibility with docker-top, which was purely ps(1) driven. Also support comma-separated descriptors as input. Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
Diffstat (limited to 'docs/podman-top.1.md')
-rw-r--r--docs/podman-top.1.md12
1 files changed, 10 insertions, 2 deletions
diff --git a/docs/podman-top.1.md b/docs/podman-top.1.md
index 52d1238ef..74175b753 100644
--- a/docs/podman-top.1.md
+++ b/docs/podman-top.1.md
@@ -7,7 +7,7 @@ podman\-top - Display the running processes of a container
**podman top** [*options*] *container* [*format-descriptors*]
## DESCRIPTION
-Display the running process of the container. The *format-descriptors* are ps (1) compatible AIX format descriptors but extended to print additional information, such as the seccomp mode or the effective capabilities of a given process.
+Display the running processes of the container. The *format-descriptors* are ps (1) compatible AIX format descriptors but extended to print additional information, such as the seccomp mode or the effective capabilities of a given process. The descriptors can either be passed as separated arguments or as a single comma-separated argument. Note that you can also specify options and or flags of ps(1); in this case, Podman will fallback to executing ps with the specified arguments and flags in the container.
## OPTIONS
@@ -83,12 +83,20 @@ root 8 1 0.000 11.386886562s pts/0 0s vi
The output can be controlled by specifying format descriptors as arguments after the container:
```
-$ sudo ./bin/podman top -l pid seccomp args %C
+$ podman top -l pid seccomp args %C
PID SECCOMP COMMAND %CPU
1 filter sh 0.000
8 filter vi /etc/ 0.000
```
+Podman will fallback to executing ps(1) in the container if an unknown descriptor is specified.
+
+```
+$ podman top -l -- aux
+USER PID PPID %CPU ELAPSED TTY TIME COMMAND
+root 1 0 0.000 1h2m12.497061672s ? 0s sleep 100000
+```
+
## SEE ALSO
podman(1), ps(1), seccomp(2), proc(5), capabilities(7)