github.com/containers/podman/v5@v5.1.0-rc1/docs/source/markdown/podman-top.1.md.in (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 13 descriptors but extended to print additional information, such as the seccomp mode or the effective capabilities 14 of a given process. The descriptors can either be passed as separated arguments or as a single comma-separated 15 argument. Note that options and or flags of ps(1) can also be specified; in this case, Podman falls back to 16 executing ps(1) from the host with the specified arguments and flags in the container namespace. If the container 17 has the `CAP_SYS_PTRACE` capability then we will execute ps(1) in the container so it must be installed there. 18 To extract host-related information, use the "h*" descriptors. For instance, `podman top $name hpid huser` 19 to display the PID and user of the processes in the host context. 20 21 ## OPTIONS 22 23 #### **--help**, **-h** 24 25 Print usage statement 26 27 @@option latest 28 29 ## FORMAT DESCRIPTORS 30 31 The following descriptors are supported in addition to the AIX format descriptors mentioned in ps (1): 32 33 **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** 34 35 **capbnd** 36 37 Set of bounding capabilities. See capabilities (7) for more information. 38 39 **capeff** 40 41 Set of effective capabilities. See capabilities (7) for more information. 42 43 **capinh** 44 45 Set of inheritable capabilities. See capabilities (7) for more information. 46 47 **capprm** 48 49 Set of permitted capabilities. See capabilities (7) for more information. 50 51 **hgroup** 52 53 The corresponding effective group of a container process on the host. 54 55 **hpid** 56 57 The corresponding host PID of a container process. 58 59 **huser** 60 61 The corresponding effective user of a container process on the host. 62 63 **label** 64 65 Current security attributes of the process. 66 67 **seccomp** 68 69 Seccomp mode of the process (i.e., disabled, strict or filter). See seccomp (2) for more information. 70 71 **state** 72 73 Process state codes (e.g, **R** for *running*, **S** for *sleeping*). See proc(5) for more information. 74 75 **stime** 76 77 Process start time (e.g, "2019-12-09 10:50:36 +0100 CET). 78 79 ## EXAMPLES 80 81 By default, `podman-top` prints data similar to `ps -ef`. 82 ``` 83 $ podman top f5a62a71b07 84 USER PID PPID %CPU ELAPSED TTY TIME COMMAND 85 root 1 0 0.000 20.386825206s pts/0 0s sh 86 root 7 1 0.000 16.386882887s pts/0 0s sleep 87 root 8 1 0.000 11.386886562s pts/0 0s vi 88 ``` 89 90 The output can be controlled by specifying format descriptors as arguments after the container. 91 ``` 92 $ podman top -l pid seccomp args %C 93 PID SECCOMP COMMAND %CPU 94 1 filter sh 0.000 95 8 filter vi /etc/ 0.000 96 ``` 97 98 Podman falls back to executing ps(1) from the host in the container namespace if an unknown descriptor is specified. 99 ``` 100 $ podman top -l -- aux 101 USER PID PPID %CPU ELAPSED TTY TIME COMMAND 102 root 1 0 0.000 1h2m12.497061672s ? 0s sleep 100000 103 ``` 104 105 ## SEE ALSO 106 **[podman(1)](podman.1.md)**, **ps(1)**, **seccomp(2)**, **proc(5)**, **capabilities(7)** 107 108 ## HISTORY 109 July 2018, Introduce format descriptors by Valentin Rothberg <vrothberg@suse.com> 110 111 December 2017, Originally compiled by Brent Baude <bbaude@redhat.com>