github.com/hanks177/podman/v4@v4.1.3-0.20220613032544-16d90015bc83/docs/source/markdown/podman-top.1.md (about) 1 % podman-top(1) 2 3 ## NAME 4 podman\-top - Display the running processes of a container 5 6 ## SYNOPSIS 7 **podman top** [*options*] *container* [*format-descriptors*] 8 9 **podman container top** [*options*] *container* [*format-descriptors*] 10 11 ## DESCRIPTION 12 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. Please use the "h*" descriptors if you want to extract host-related information. For instance, `podman top $name hpid huser` to display the PID and user of the processes in the host context. 13 14 ## OPTIONS 15 16 #### **--help**, **-h** 17 18 Print usage statement 19 20 #### **--latest**, **-l** 21 22 Instead of providing the container name or ID, use the last created container. If you use methods other than Podman 23 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) 24 25 ## FORMAT DESCRIPTORS 26 27 The following descriptors are supported in addition to the AIX format descriptors mentioned in ps (1): 28 29 **args, capbnd, capeff, capinh, capprm, comm, etime, group, hgroup, hpid, huser, label, nice, pcpu, pgid, pid, ppid, rgroup, ruser, seccomp, state, time, tty, user, vsz** 30 31 **capbnd** 32 33 Set of bounding capabilities. See capabilities (7) for more information. 34 35 **capeff** 36 37 Set of effective capabilities. See capabilities (7) for more information. 38 39 **capinh** 40 41 Set of inheritable capabilities. See capabilities (7) for more information. 42 43 **capprm** 44 45 Set of permitted capabilities. See capabilities (7) for more information. 46 47 **hgroup** 48 49 The corresponding effective group of a container process on the host. 50 51 **hpid** 52 53 The corresponding host PID of a container process. 54 55 **huser** 56 57 The corresponding effective user of a container process on the host. 58 59 **label** 60 61 Current security attributes of the process. 62 63 **seccomp** 64 65 Seccomp mode of the process (i.e., disabled, strict or filter). See seccomp (2) for more information. 66 67 **state** 68 69 Process state codes (e.g, **R** for *running*, **S** for *sleeping*). See proc(5) for more information. 70 71 **stime** 72 73 Process start time (e.g, "2019-12-09 10:50:36 +0100 CET). 74 75 ## EXAMPLES 76 77 By default, `podman-top` prints data similar to `ps -ef`: 78 79 ``` 80 $ podman top f5a62a71b07 81 USER PID PPID %CPU ELAPSED TTY TIME COMMAND 82 root 1 0 0.000 20.386825206s pts/0 0s sh 83 root 7 1 0.000 16.386882887s pts/0 0s sleep 84 root 8 1 0.000 11.386886562s pts/0 0s vi 85 ``` 86 87 The output can be controlled by specifying format descriptors as arguments after the container: 88 89 ``` 90 $ podman top -l pid seccomp args %C 91 PID SECCOMP COMMAND %CPU 92 1 filter sh 0.000 93 8 filter vi /etc/ 0.000 94 ``` 95 96 Podman will fallback to executing ps(1) in the container if an unknown descriptor is specified. 97 98 ``` 99 $ podman top -l -- aux 100 USER PID PPID %CPU ELAPSED TTY TIME COMMAND 101 root 1 0 0.000 1h2m12.497061672s ? 0s sleep 100000 102 ``` 103 104 ## SEE ALSO 105 **[podman(1)](podman.1.md)**, **ps(1)**, **seccomp(2)**, **proc(5)**, **capabilities(7)** 106 107 ## HISTORY 108 July 2018, Introduce format descriptors by Valentin Rothberg <vrothberg@suse.com> 109 110 December 2017, Originally compiled by Brent Baude <bbaude@redhat.com>