144 lines
4.0 KiB
Groff
144 lines
4.0 KiB
Groff
.nh
|
|
.TH podman-top 1
|
|
.SH NAME
|
|
podman-top \- Display the running processes of a container
|
|
|
|
.SH SYNOPSIS
|
|
\fBpodman top\fP [\fIoptions\fP] \fIcontainer\fP [\fIformat-descriptors\fP]
|
|
|
|
.PP
|
|
\fBpodman container top\fP [\fIoptions\fP] \fIcontainer\fP [\fIformat-descriptors\fP]
|
|
|
|
.SH DESCRIPTION
|
|
Display the running processes of the container. The \fIformat-descriptors\fP 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 options and or flags of ps(1) can also be specified; in this case, Podman falls back to
|
|
executing ps(1) from the host with the specified arguments and flags in the container namespace. If the container
|
|
has the \fBCAP_SYS_PTRACE\fR capability then we will execute ps(1) in the container so it must be installed there.
|
|
To extract host-related information, use the "h*" descriptors. For instance, \fBpodman top $name hpid huser\fR
|
|
to display the PID and user of the processes in the host context.
|
|
|
|
.SH OPTIONS
|
|
.SS \fB--help\fP, \fB-h\fP
|
|
Print usage statement
|
|
|
|
.SS \fB--latest\fP, \fB-l\fP
|
|
Instead of providing the container name or ID, use the last created container.
|
|
Note: the last started container can be from other users of Podman on the host machine.
|
|
(This option is not available with the remote Podman client, including Mac and Windows
|
|
(excluding WSL2) machines)
|
|
|
|
.SH FORMAT DESCRIPTORS
|
|
The following descriptors are supported in addition to the AIX format descriptors mentioned in ps (1):
|
|
|
|
.PP
|
|
\fBargs, capbnd, capeff, capinh, capprm, comm, etime, group, hgroup, hpid, huser, label, nice, pcpu, pgid, pid, ppid, rgroup, ruser, seccomp, state, time, tty, user, vsz\fP
|
|
|
|
.PP
|
|
\fBcapbnd\fP
|
|
|
|
.PP
|
|
Set of bounding capabilities. See capabilities (7) for more information.
|
|
|
|
.PP
|
|
\fBcapeff\fP
|
|
|
|
.PP
|
|
Set of effective capabilities. See capabilities (7) for more information.
|
|
|
|
.PP
|
|
\fBcapinh\fP
|
|
|
|
.PP
|
|
Set of inheritable capabilities. See capabilities (7) for more information.
|
|
|
|
.PP
|
|
\fBcapprm\fP
|
|
|
|
.PP
|
|
Set of permitted capabilities. See capabilities (7) for more information.
|
|
|
|
.PP
|
|
\fBhgroup\fP
|
|
|
|
.PP
|
|
The corresponding effective group of a container process on the host.
|
|
|
|
.PP
|
|
\fBhpid\fP
|
|
|
|
.PP
|
|
The corresponding host PID of a container process.
|
|
|
|
.PP
|
|
\fBhuser\fP
|
|
|
|
.PP
|
|
The corresponding effective user of a container process on the host.
|
|
|
|
.PP
|
|
\fBlabel\fP
|
|
|
|
.PP
|
|
Current security attributes of the process.
|
|
|
|
.PP
|
|
\fBseccomp\fP
|
|
|
|
.PP
|
|
Seccomp mode of the process (i.e., disabled, strict or filter). See seccomp (2) for more information.
|
|
|
|
.PP
|
|
\fBstate\fP
|
|
|
|
.PP
|
|
Process state codes (e.g, \fBR\fP for \fIrunning\fP, \fBS\fP for \fIsleeping\fP). See proc(5) for more information.
|
|
|
|
.PP
|
|
\fBstime\fP
|
|
|
|
.PP
|
|
Process start time (e.g, "2019-12-09 10:50:36 +0100 CET).
|
|
|
|
.SH EXAMPLES
|
|
By default, \fBpodman-top\fR prints data similar to \fBps -ef\fR\&.
|
|
|
|
.EX
|
|
$ podman top f5a62a71b07
|
|
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
|
|
.EE
|
|
|
|
.PP
|
|
The output can be controlled by specifying format descriptors as arguments after the container.
|
|
|
|
.EX
|
|
$ podman top -l pid seccomp args %C
|
|
PID SECCOMP COMMAND %CPU
|
|
1 filter sh 0.000
|
|
8 filter vi /etc/ 0.000
|
|
.EE
|
|
|
|
.PP
|
|
Podman falls back to executing ps(1) from the host in the container namespace if an unknown descriptor is specified.
|
|
|
|
.EX
|
|
$ podman top -l -- aux
|
|
USER PID PPID %CPU ELAPSED TTY TIME COMMAND
|
|
root 1 0 0.000 1h2m12.497061672s ? 0s sleep 100000
|
|
.EE
|
|
|
|
.SH SEE ALSO
|
|
\fBpodman(1)\fP, \fBps(1)\fP, \fBseccomp(2)\fP, \fBproc(5)\fP, \fBcapabilities(7)\fP
|
|
|
|
.SH HISTORY
|
|
July 2018, Introduce format descriptors by Valentin Rothberg vrothberg@suse.com
|
|
\[la]mailto:vrothberg@suse.com\[ra]
|
|
|
|
.PP
|
|
December 2017, Originally compiled by Brent Baude bbaude@redhat.com
|
|
\[la]mailto:bbaude@redhat.com\[ra]
|