262 lines
7.7 KiB
Groff
262 lines
7.7 KiB
Groff
'\" t
|
||
.nh
|
||
.TH podman-pod-ps 1
|
||
.SH NAME
|
||
podman-pod-ps \- Print out information about pods
|
||
|
||
.SH SYNOPSIS
|
||
\fBpodman pod ps\fP [\fIoptions\fP]
|
||
|
||
.SH DESCRIPTION
|
||
\fBpodman pod ps\fP lists the pods on the system.
|
||
By default it lists:
|
||
.IP \(bu 2
|
||
pod ID
|
||
.IP \(bu 2
|
||
pod name
|
||
.IP \(bu 2
|
||
the time the pod was created
|
||
.IP \(bu 2
|
||
number of containers attached to pod
|
||
.IP \(bu 2
|
||
container ID of the pod infra container
|
||
.IP \(bu 2
|
||
status of pod as defined by the following table
|
||
|
||
.TS
|
||
allbox;
|
||
l l
|
||
l l .
|
||
\fB\fBStatus\fP\fP \fB\fBDescription\fP\fP
|
||
Created T{
|
||
No containers running nor stopped
|
||
T}
|
||
Running T{
|
||
at least one container is running
|
||
T}
|
||
Stopped T{
|
||
At least one container stopped and none running
|
||
T}
|
||
Exited All containers stopped in pod
|
||
Dead Error retrieving state
|
||
.TE
|
||
|
||
.SH OPTIONS
|
||
.SS \fB--ctr-ids\fP
|
||
Display the container IDs
|
||
|
||
.SS \fB--ctr-names\fP
|
||
Display the container names
|
||
|
||
.SS \fB--ctr-status\fP
|
||
Display the container statuses
|
||
|
||
.SS \fB--filter\fP, \fB-f\fP=\fIfilter\fP
|
||
Provide filter values.
|
||
|
||
.PP
|
||
The \fIfilters\fP argument format is of \fBkey=value\fR\&. If there is more than one \fIfilter\fP, then pass multiple OPTIONS: \fB--filter\fP \fIfoo=bar\fP \fB--filter\fP \fIbif=baz\fP\&.
|
||
|
||
.PP
|
||
Supported filters:
|
||
|
||
.TS
|
||
allbox;
|
||
l l
|
||
l l .
|
||
\fBFilter\fP \fBDescription\fP
|
||
ctr-ids T{
|
||
Filter by container ID within the pod. (CID prefix match by default; accepts regex)
|
||
T}
|
||
ctr-names T{
|
||
Filter by container name within the pod.
|
||
T}
|
||
ctr-number T{
|
||
Filter by number of containers in the pod.
|
||
T}
|
||
ctr-status T{
|
||
Filter by container status within the pod.
|
||
T}
|
||
id T{
|
||
Filter by pod ID. (Prefix match by default; accepts regex)
|
||
T}
|
||
label T{
|
||
Filter by container with (or without, in the case of label!=[...] is used) the specified labels.
|
||
T}
|
||
name Filter by pod name.
|
||
network T{
|
||
Filter by network name or full ID of network.
|
||
T}
|
||
status Filter by pod status.
|
||
until T{
|
||
Filter by pods created before given timestamp.
|
||
T}
|
||
.TE
|
||
|
||
.PP
|
||
The \fBctr-ids\fR, \fBctr-names\fR, \fBid\fR, \fBname\fR filters accept \fBregex\fR format.
|
||
|
||
.PP
|
||
The \fBctr-status\fR filter accepts values: \fBcreated\fR, \fBrunning\fR, \fBpaused\fR, \fBstopped\fR, \fBexited\fR, \fBunknown\fR\&.
|
||
|
||
.PP
|
||
The \fBlabel\fR \fIfilter\fP accepts two formats. One is the \fBlabel\fR=\fIkey\fP or \fBlabel\fR=\fIkey\fP=\fIvalue\fP, which removes containers with the specified labels. The other format is the \fBlabel!\fR=\fIkey\fP or \fBlabel!\fR=\fIkey\fP=\fIvalue\fP, which removes containers without the specified labels.
|
||
|
||
.PP
|
||
The \fBuntil\fR \fIfilter\fP can be Unix timestamps, date formatted timestamps, or Go duration strings (e.g. 10m, 1h30m) computed relative to the machine’s time.
|
||
|
||
.PP
|
||
The \fBstatus\fR filter accepts values: \fBstopped\fR, \fBrunning\fR, \fBpaused\fR, \fBexited\fR, \fBdead\fR, \fBcreated\fR, \fBdegraded\fR\&.
|
||
|
||
.SS \fB--format\fP=\fIformat\fP
|
||
Pretty-print containers to JSON or using a Go template
|
||
|
||
.PP
|
||
Valid placeholders for the Go template are listed below:
|
||
|
||
.TS
|
||
allbox;
|
||
l l
|
||
l l .
|
||
\fB\fBPlaceholder\fP\fP \fB\fBDescription\fP\fP
|
||
\&.Cgroup Cgroup path of pod
|
||
\&.ContainerIds T{
|
||
Comma-separated list of container IDs in the pod
|
||
T}
|
||
\&.ContainerNames T{
|
||
Comma-separated list of container names in the pod
|
||
T}
|
||
\&.ContainerStatuses T{
|
||
Comma-separated list of container statuses
|
||
T}
|
||
\&.Created Creation time of pod
|
||
\&.ID Container ID
|
||
\&.InfraID Pod infra container ID
|
||
\&.Label \fIstring\fP Specified label of the pod
|
||
\&.Labels ... T{
|
||
All the labels assigned to the pod
|
||
T}
|
||
\&.Name Name of pod
|
||
\&.Networks T{
|
||
Show all networks connected to the infra container
|
||
T}
|
||
\&.NumberOfContainers T{
|
||
Show the number of containers attached to pod
|
||
T}
|
||
\&.Restarts T{
|
||
Show the total number of container restarts in a pod
|
||
T}
|
||
\&.Status Status of pod
|
||
.TE
|
||
|
||
.SS \fB--help\fP, \fB-h\fP
|
||
Print usage statement
|
||
|
||
.SS \fB--latest\fP, \fB-l\fP
|
||
Show the latest pod created (all states) (This option is not available with the remote Podman client, including Mac and Windows (excluding WSL2) machines)
|
||
|
||
.SS \fB--namespace\fP, \fB--ns\fP
|
||
Display namespace information of the pod
|
||
|
||
.SS \fB--no-trunc\fP
|
||
Do not truncate the output (default \fIfalse\fP).
|
||
|
||
.SS \fB--noheading\fP, \fB-n\fP
|
||
Omit the table headings from the listing.
|
||
|
||
.SS \fB--quiet\fP, \fB-q\fP
|
||
Print the numeric IDs of the pods only
|
||
|
||
.SS \fB--sort\fP
|
||
Sort by created, ID, name, status, or number of containers
|
||
|
||
.PP
|
||
Default: created
|
||
|
||
.SH EXAMPLES
|
||
List all running pods.
|
||
|
||
.EX
|
||
$ podman pod ps
|
||
POD ID NAME STATUS CREATED INFRA ID # OF CONTAINERS
|
||
00dfd6fa02c0 jolly_goldstine Running 31 hours ago ba465ab0a3a4 1
|
||
f4df8692e116 nifty_torvalds Created 10 minutes ago 331693bff40a 2
|
||
.EE
|
||
|
||
.PP
|
||
List all running pods along with container names within the pods.
|
||
|
||
.EX
|
||
$ podman pod ps --ctr-names
|
||
POD ID NAME STATUS CREATED INFRA ID NAMES
|
||
00dfd6fa02c0 jolly_goldstine Running 31 hours ago ba465ab0a3a4 loving_archimedes
|
||
f4df8692e116 nifty_torvalds Created 10 minutes ago 331693bff40a thirsty_hawking,wizardly_golick
|
||
.EE
|
||
|
||
.PP
|
||
List all running pods along with status, names and ids.
|
||
|
||
.EX
|
||
$ podman pod ps --ctr-status --ctr-names --ctr-ids
|
||
POD ID NAME STATUS CREATED INFRA ID IDS NAMES STATUS
|
||
00dfd6fa02c0 jolly_goldstine Running 31 hours ago ba465ab0a3a4 ba465ab0a3a4 loving_archimedes running
|
||
f4df8692e116 nifty_torvalds Created 10 minutes ago 331693bff40a 331693bff40a,8e428daeb89e thirsty_hawking,wizardly_golick configured,configured
|
||
.EE
|
||
|
||
.PP
|
||
List all running pods and print ID, Container Names, and cgroups.
|
||
|
||
.EX
|
||
$ podman pod ps --format "{{.ID}} {{.ContainerNames}} {{.Cgroup}}"
|
||
00dfd6fa02c0 loving_archimedes /libpod_parent
|
||
f4df8692e116 thirsty_hawking,wizardly_golick /libpod_parent
|
||
.EE
|
||
|
||
.PP
|
||
List all running pods with two containers sorted by pod ID.
|
||
|
||
.EX
|
||
$ podman pod ps --sort id --filter ctr-number=2
|
||
POD ID NAME STATUS CREATED INFRA ID # OF CONTAINERS
|
||
f4df8692e116 nifty_torvalds Created 10 minutes ago 331693bff40a 2
|
||
.EE
|
||
|
||
.PP
|
||
List all running pods with their container ids.
|
||
|
||
.EX
|
||
$ podman pod ps --ctr-ids
|
||
POD ID NAME STATUS CREATED INFRA ID IDS
|
||
00dfd6fa02c0 jolly_goldstine Running 31 hours ago ba465ab0a3a4 ba465ab0a3a4
|
||
f4df8692e116 nifty_torvalds Created 10 minutes ago 331693bff40a 331693bff40a,8e428daeb89e
|
||
.EE
|
||
|
||
.PP
|
||
List all running pods with container ids without truncating IDs.
|
||
|
||
.EX
|
||
$ podman pod ps --no-trunc --ctr-ids
|
||
POD ID NAME STATUS CREATED INFRA ID IDS
|
||
00dfd6fa02c0a2daaedfdf8fcecd06f22ad114d46d167d71777224735f701866 jolly_goldstine Running 31 hours ago ba465ab0a3a4e15e3539a1e79c32d1213a02b0989371e274f98e0f1ae9de7050 ba465ab0a3a4e15e3539a1e79c32d1213a02b0989371e274f98e0f1ae9de7050
|
||
f4df8692e116a3e6d1d62572644ed36ca475d933808cc3c93435c45aa139314b nifty_torvalds Created 10 minutes ago 331693bff40a926b6d52b184e116afd15497610c378d5d4c42945dd6e33b75b0 331693bff40a926b6d52b184e116afd15497610c378d5d4c42945dd6e33b75b0,8e428daeb89e69b71e7916a13accfb87d122889442b5c05c2d99cf94a3230e9d
|
||
.EE
|
||
|
||
.PP
|
||
List all running pods with container names.
|
||
|
||
.EX
|
||
$ podman pod ps --ctr-names
|
||
POD ID NAME STATUS CREATED INFRA ID NAMES
|
||
314f4da82d74 hi Created 17 hours ago a9f2d2165675 jovial_jackson,hopeful_archimedes,vibrant_ptolemy,heuristic_jennings,keen_raman,hopeful_newton,mystifying_bose,silly_lalande,serene_lichterman ...
|
||
.EE
|
||
|
||
.SH pod ps
|
||
Print a list of pods
|
||
|
||
.SH SEE ALSO
|
||
\fBpodman(1)\fP, \fBpodman-pod(1)\fP
|
||
|
||
.SH HISTORY
|
||
July 2018, Originally compiled by Peter Hunt pehunt@redhat.com
|
||
\[la]mailto:pehunt@redhat.com\[ra]
|