2019-05-31 19:21:47 +00:00
% podman-top(1)
2017-12-11 15:34:58 +00:00
## NAME
2018-04-26 13:21:11 +00:00
podman\-top - Display the running processes of a container
2017-12-11 15:34:58 +00:00
## SYNOPSIS
2018-07-19 12:41:58 +00:00
**podman top** [*options*] *container* [*format-descriptors*]
2017-12-11 15:34:58 +00:00
2019-08-31 20:58:52 +00:00
**podman container top** [*options*] *container* [*format-descriptors*]
2017-12-11 15:34:58 +00:00
## DESCRIPTION
2019-04-29 09:21:55 +00:00
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.
2017-12-11 15:34:58 +00:00
## OPTIONS
2019-05-31 19:21:47 +00:00
**--help**, ** -h**
2018-06-14 15:44:39 +00:00
2019-05-31 19:21:47 +00:00
Print usage statement
2017-12-11 15:34:58 +00:00
2019-05-31 19:21:47 +00:00
**--latest**, ** -l**
2018-06-14 15:44:39 +00:00
2018-01-02 22:29:43 +00:00
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.
2019-02-21 23:09:59 +00:00
The latest option is not supported on the remote client.
2018-07-19 12:41:58 +00:00
## FORMAT DESCRIPTORS
The following descriptors are supported in addition to the AIX format descriptors mentioned in ps (1):
2018-07-26 13:26:52 +00:00
**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**
2018-07-23 14:00:11 +00:00
2018-07-24 12:20:54 +00:00
**capbnd**
2018-07-19 12:41:58 +00:00
2018-07-24 12:20:54 +00:00
Set of bounding capabilities. See capabilities (7) for more information.
2018-07-19 12:41:58 +00:00
**capeff**
Set of effective capabilities. See capabilities (7) for more information.
2018-07-24 12:20:54 +00:00
**capinh**
2018-07-19 12:41:58 +00:00
2018-07-24 12:20:54 +00:00
Set of inheritable capabilities. See capabilities (7) for more information.
**capprm**
Set of permitted capabilities. See capabilities (7) for more information.
2018-07-19 12:41:58 +00:00
2018-07-26 13:26:52 +00:00
**hgroup**
2018-07-19 12:41:58 +00:00
2018-07-26 13:26:52 +00:00
The corresponding effective group of a container process on the host.
**hpid**
The corresponding host PID of a container process.
**huser**
The corresponding effective user of a container process on the host.
2018-07-19 12:41:58 +00:00
**label**
Current security attributes of the process.
2018-07-26 13:26:52 +00:00
**seccomp**
Seccomp mode of the process (i.e., disabled, strict or filter). See seccomp (2) for more information.
**state**
Process state codes (e.g, **R** for *running* , **S** for *sleeping* ). See proc(5) for more information.
2017-12-11 15:34:58 +00:00
## EXAMPLES
2018-07-19 12:41:58 +00:00
By default, `podman-top` prints data similar to `ps -ef` :
2017-12-11 15:34:58 +00:00
```
2018-08-30 11:05:37 +00:00
$ podman top f5a62a71b07
2018-07-19 12:41:58 +00:00
USER PID PPID %CPU ELAPSED TTY TIME COMMAND
root 1 0 0.000 20.386825206s pts/0 0s sh
root 7 1 0.000 16.386882887s pts/0 0s sleep
root 8 1 0.000 11.386886562s pts/0 0s vi
2017-12-11 15:34:58 +00:00
```
2018-07-19 12:41:58 +00:00
The output can be controlled by specifying format descriptors as arguments after the container:
2017-12-11 15:34:58 +00:00
```
2019-04-29 09:21:55 +00:00
$ podman top -l pid seccomp args %C
2018-07-19 12:41:58 +00:00
PID SECCOMP COMMAND %CPU
1 filter sh 0.000
8 filter vi /etc/ 0.000
2017-12-11 15:34:58 +00:00
```
2018-07-19 12:41:58 +00:00
2019-04-29 09:21:55 +00:00
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
```
2017-12-11 15:34:58 +00:00
## SEE ALSO
2018-07-26 13:26:52 +00:00
podman(1), ps(1), seccomp(2), proc(5), capabilities(7)
2017-12-11 15:34:58 +00:00
## HISTORY
2018-07-19 12:41:58 +00:00
July 2018, Introduce format descriptors by Valentin Rothberg < vrothberg @ suse . com >
2018-08-30 08:55:11 +00:00
December 2017, Originally compiled by Brent Baude < bbaude @ redhat . com >