github.com/hanks177/podman/v4@v4.1.3-0.20220613032544-16d90015bc83/docs/source/markdown/podman-pod-ps.1.md (about) 1 % podman-pod-ps(1) 2 3 ## NAME 4 podman\-pod\-ps - Prints out information about pods 5 6 ## SYNOPSIS 7 **podman pod ps** [*options*] 8 9 ## DESCRIPTION 10 **podman pod ps** lists the pods on the system. 11 By default it lists: 12 13 * pod id 14 * pod name 15 * the time the pod was created 16 * number of containers attached to pod 17 * container id of the pod infra container 18 * status of pod as defined by the following table 19 20 | **Status** | **Description** | 21 | ------------ | ------------------------------------------------| 22 | Created | No containers running nor stopped | 23 | Running | at least one container is running | 24 | Stopped | At least one container stopped and none running | 25 | Exited | All containers stopped in pod | 26 | Dead | Error retrieving state | 27 28 29 ## OPTIONS 30 31 #### **--ctr-ids** 32 33 Display the container IDs 34 35 #### **--ctr-names** 36 37 Display the container names 38 39 #### **--ctr-status** 40 41 Display the container statuses 42 43 #### **--filter**, **-f**=*filter* 44 45 Provide filter values. 46 47 The *filters* argument format is of `key=value`. If there is more than one *filter*, then pass multiple OPTIONS: **--filter** *foo=bar* **--filter** *bif=baz*. 48 49 Supported filters: 50 51 | Filter | Description | 52 | ---------- | -------------------------------------------------------------------------------------------------- | 53 | *ctr-ids* | Filter by container ID within the pod. | 54 | *ctr-names* | Filter by container name within the pod. | 55 | *ctr-number*| Filter by number of containers in the pod. | 56 | *ctr-status*| Filter by container status within the pod. | 57 | *id* | Filter by pod ID. | 58 | *label* | Filter by container with (or without, in the case of label!=[...] is used) the specified labels. | 59 | *name* | Filter by pod name. | 60 | *network* | Filter by network name or full ID of network. | 61 | *status* | Filter by pod status. | 62 | *until* | Filter by pods created before given timestamp. | 63 64 The `ctr-ids`, `ctr-names`, `id`, `name` filters accept `regex` format. 65 66 The `ctr-status` filter accepts values: `created`, `running`, `paused`, `stopped`, `exited`, `unknown`. 67 68 The `label` *filter* accepts two formats. One is the `label`=*key* or `label`=*key*=*value*, which removes containers with the specified labels. The other format is the `label!`=*key* or `label!`=*key*=*value*, which removes containers without the specified labels. 69 70 The `until` *filter* can be Unix timestamps, date formatted timestamps, or Go duration strings (e.g. 10m, 1h30m) computed relative to the machine’s time. 71 72 The `status` filter accepts values: `stopped`, `running`, `paused`, `exited`, `dead`, `created`, `degraded`. 73 74 #### **--format**=*format* 75 76 Pretty-print containers to JSON or using a Go template 77 78 Valid placeholders for the Go template are listed below: 79 80 | **Placeholder** | **Description** | 81 | ------------------- | ----------------------------------------------------------------------------------------------- | 82 | .ID | Container ID | 83 | .Name | Name of pod | 84 | .Status | Status of pod | 85 | .Labels | All the labels assigned to the pod | 86 | .NumberOfContainers | Show the number of containers attached to pod | 87 | .Cgroup | Cgroup path of pod | 88 | .Created | Creation time of pod | 89 | .InfraID | Pod infra container ID | 90 | .Networks | Show all networks connected to the infra container | 91 92 #### **--help**, **-h** 93 94 Print usage statement 95 96 #### **--latest**, **-l** 97 98 Show the latest pod created (all states) (This option is not available with the remote Podman client, including Mac and Windows (excluding WSL2) machines) 99 100 #### **--no-trunc** 101 102 Do not truncate the output (default *false*). 103 104 #### **--noheading** 105 106 Omit the table headings from the listing of pods. 107 108 #### **--ns** 109 110 Display namespace information of the pod 111 112 #### **--quiet**, **-q** 113 114 Print the numeric IDs of the pods only 115 116 #### **--sort** 117 118 Sort by created, ID, name, status, or number of containers 119 120 Default: created 121 122 ## EXAMPLES 123 124 ``` 125 $ podman pod ps 126 POD ID NAME STATUS CREATED INFRA ID # OF CONTAINERS 127 00dfd6fa02c0 jolly_goldstine Running 31 hours ago ba465ab0a3a4 1 128 f4df8692e116 nifty_torvalds Created 10 minutes ago 331693bff40a 2 129 ``` 130 131 ``` 132 $ podman pod ps --ctr-names 133 POD ID NAME STATUS CREATED INFRA ID NAMES 134 00dfd6fa02c0 jolly_goldstine Running 31 hours ago ba465ab0a3a4 loving_archimedes 135 f4df8692e116 nifty_torvalds Created 10 minutes ago 331693bff40a thirsty_hawking,wizardly_golick 136 ``` 137 138 ``` 139 $ podman pod ps --ctr-status --ctr-names --ctr-ids 140 POD ID NAME STATUS CREATED INFRA ID IDS NAMES STATUS 141 00dfd6fa02c0 jolly_goldstine Running 31 hours ago ba465ab0a3a4 ba465ab0a3a4 loving_archimedes running 142 f4df8692e116 nifty_torvalds Created 10 minutes ago 331693bff40a 331693bff40a,8e428daeb89e thirsty_hawking,wizardly_golick configured,configured 143 ``` 144 145 ``` 146 $ podman pod ps --format "{{.ID}} {{.ContainerNames}} {{.Cgroup}}" 147 00dfd6fa02c0 loving_archimedes /libpod_parent 148 f4df8692e116 thirsty_hawking,wizardly_golick /libpod_parent 149 ``` 150 151 ``` 152 $ podman pod ps --sort id --filter ctr-number=2 153 POD ID NAME STATUS CREATED INFRA ID # OF CONTAINERS 154 f4df8692e116 nifty_torvalds Created 10 minutes ago 331693bff40a 2 155 ``` 156 157 ``` 158 $ podman pod ps --ctr-ids 159 POD ID NAME STATUS CREATED INFRA ID IDS 160 00dfd6fa02c0 jolly_goldstine Running 31 hours ago ba465ab0a3a4 ba465ab0a3a4 161 f4df8692e116 nifty_torvalds Created 10 minutes ago 331693bff40a 331693bff40a,8e428daeb89e 162 ``` 163 164 ``` 165 $ podman pod ps --no-trunc --ctr-ids 166 POD ID NAME STATUS CREATED INFRA ID IDS 167 00dfd6fa02c0a2daaedfdf8fcecd06f22ad114d46d167d71777224735f701866 jolly_goldstine Running 31 hours ago ba465ab0a3a4e15e3539a1e79c32d1213a02b0989371e274f98e0f1ae9de7050 ba465ab0a3a4e15e3539a1e79c32d1213a02b0989371e274f98e0f1ae9de7050 168 f4df8692e116a3e6d1d62572644ed36ca475d933808cc3c93435c45aa139314b nifty_torvalds Created 10 minutes ago 331693bff40a926b6d52b184e116afd15497610c378d5d4c42945dd6e33b75b0 331693bff40a926b6d52b184e116afd15497610c378d5d4c42945dd6e33b75b0,8e428daeb89e69b71e7916a13accfb87d122889442b5c05c2d99cf94a3230e9d 169 ``` 170 171 ``` 172 $ podman pod ps --ctr-names 173 POD ID NAME STATUS CREATED INFRA ID NAMES 174 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 ... 175 ``` 176 177 ## pod ps 178 Print a list of pods 179 180 ## SEE ALSO 181 **[podman(1)](podman.1.md)**, **[podman-pod(1)](podman-pod.1.md)** 182 183 ## HISTORY 184 July 2018, Originally compiled by Peter Hunt <pehunt@redhat.com>