1podman-pod-ps(1) General Commands Manual podman-pod-ps(1)
2
3
4
6 podman-pod-ps - Print out information about pods
7
8
10 podman pod ps [options]
11
12
14 podman pod ps lists the pods on the system. By default it lists:
15
16
17 • pod ID
18
19 • pod name
20
21 • the time the pod was created
22
23 • number of containers attached to pod
24
25 • container ID of the pod infra container
26
27 • status of pod as defined by the following table
28
29
30
31 ┌────────┬───────────────────────────────┐
32 │Status │ Description │
33 ├────────┼───────────────────────────────┤
34 │Created │ No containers running nor │
35 │ │ stopped │
36 ├────────┼───────────────────────────────┤
37 │Running │ at least one container is │
38 │ │ running │
39 ├────────┼───────────────────────────────┤
40 │Stopped │ At least one container │
41 │ │ stopped and none running │
42 ├────────┼───────────────────────────────┤
43 │Exited │ All containers stopped in pod │
44 ├────────┼───────────────────────────────┤
45 │Dead │ Error retrieving state │
46 └────────┴───────────────────────────────┘
47
49 --ctr-ids
50 Display the container IDs
51
52
53 --ctr-names
54 Display the container names
55
56
57 --ctr-status
58 Display the container statuses
59
60
61 --filter, -f=filter
62 Provide filter values.
63
64
65 The filters argument format is of key=value. If there is more than one
66 filter, then pass multiple OPTIONS: --filter foo=bar --filter bif=baz.
67
68
69 Supported filters:
70
71
72 ┌───────────┬────────────────────────────┐
73 │Filter │ Description │
74 ├───────────┼────────────────────────────┤
75 │ctr-ids │ Filter by container ID │
76 │ │ within the pod. (CID pre‐ │
77 │ │ fix match by default; ac‐ │
78 │ │ cepts regex) │
79 ├───────────┼────────────────────────────┤
80 │ctr-names │ Filter by container name │
81 │ │ within the pod. │
82 ├───────────┼────────────────────────────┤
83 │ctr-number │ Filter by number of con‐ │
84 │ │ tainers in the pod. │
85 ├───────────┼────────────────────────────┤
86 │ctr-status │ Filter by container status │
87 │ │ within the pod. │
88 ├───────────┼────────────────────────────┤
89 │id │ Filter by pod ID. (Prefix │
90 │ │ match by default; accepts │
91 │ │ regex) │
92 ├───────────┼────────────────────────────┤
93 │label │ Filter by container with │
94 │ │ (or without, in the case │
95 │ │ of label!=[...] is used) │
96 │ │ the specified labels. │
97 ├───────────┼────────────────────────────┤
98 │name │ Filter by pod name. │
99 ├───────────┼────────────────────────────┤
100 │network │ Filter by network name or │
101 │ │ full ID of network. │
102 ├───────────┼────────────────────────────┤
103 │status │ Filter by pod status. │
104 ├───────────┼────────────────────────────┤
105 │until │ Filter by pods created be‐ │
106 │ │ fore given timestamp. │
107 └───────────┴────────────────────────────┘
108
109 The ctr-ids, ctr-names, id, name filters accept regex format.
110
111
112 The ctr-status filter accepts values: created, running, paused,
113 stopped, exited, unknown.
114
115
116 The label filter accepts two formats. One is the label=key or la‐
117 bel=key=value, which removes containers with the specified labels. The
118 other format is the label!=key or label!=key=value, which removes con‐
119 tainers without the specified labels.
120
121
122 The until filter can be Unix timestamps, date formatted timestamps, or
123 Go duration strings (e.g. 10m, 1h30m) computed relative to the ma‐
124 chine’s time.
125
126
127 The status filter accepts values: stopped, running, paused, exited,
128 dead, created, degraded.
129
130
131 --format=format
132 Pretty-print containers to JSON or using a Go template
133
134
135 Valid placeholders for the Go template are listed below:
136
137
138 ┌────────────────────┬────────────────────────────┐
139 │Placeholder │ Description │
140 ├────────────────────┼────────────────────────────┤
141 │.Cgroup │ Cgroup path of pod │
142 ├────────────────────┼────────────────────────────┤
143 │.ContainerIds │ Comma-separated list of │
144 │ │ container IDs in the pod │
145 ├────────────────────┼────────────────────────────┤
146 │.ContainerNames │ Comma-separated list of │
147 │ │ container names in the pod │
148 ├────────────────────┼────────────────────────────┤
149 │.ContainerStatuses │ Comma-separated list of │
150 │ │ container statuses │
151 ├────────────────────┼────────────────────────────┤
152 │.Created │ Creation time of pod │
153 ├────────────────────┼────────────────────────────┤
154 │.ID │ Container ID │
155 ├────────────────────┼────────────────────────────┤
156 │.InfraID │ Pod infra container ID │
157 ├────────────────────┼────────────────────────────┤
158 │.Labels │ All the labels assigned to │
159 │ │ the pod │
160 ├────────────────────┼────────────────────────────┤
161 │.Name │ Name of pod │
162 ├────────────────────┼────────────────────────────┤
163 │.Networks │ Show all networks con‐ │
164 │ │ nected to the infra con‐ │
165 │ │ tainer │
166 ├────────────────────┼────────────────────────────┤
167 │.NumberOfContainers │ Show the number of con‐ │
168 │ │ tainers attached to pod │
169 ├────────────────────┼────────────────────────────┤
170 │.Restarts │ Show the total number of │
171 │ │ container restarts in a │
172 │ │ pod │
173 ├────────────────────┼────────────────────────────┤
174 │.Status │ Status of pod │
175 └────────────────────┴────────────────────────────┘
176
177 --help, -h
178 Print usage statement
179
180
181 --latest, -l
182 Show the latest pod created (all states) (This option is not available
183 with the remote Podman client, including Mac and Windows (excluding
184 WSL2) machines)
185
186
187 --namespace, --ns
188 Display namespace information of the pod
189
190
191 --no-trunc
192 Do not truncate the output (default false).
193
194
195 --noheading, -n
196 Omit the table headings from the listing.
197
198
199 --quiet, -q
200 Print the numeric IDs of the pods only
201
202
203 --sort
204 Sort by created, ID, name, status, or number of containers
205
206
207 Default: created
208
209
211 $ podman pod ps
212 POD ID NAME STATUS CREATED INFRA ID # OF CONTAINERS
213 00dfd6fa02c0 jolly_goldstine Running 31 hours ago ba465ab0a3a4 1
214 f4df8692e116 nifty_torvalds Created 10 minutes ago 331693bff40a 2
215
216
217
218 $ podman pod ps --ctr-names
219 POD ID NAME STATUS CREATED INFRA ID NAMES
220 00dfd6fa02c0 jolly_goldstine Running 31 hours ago ba465ab0a3a4 loving_archimedes
221 f4df8692e116 nifty_torvalds Created 10 minutes ago 331693bff40a thirsty_hawking,wizardly_golick
222
223
224
225 $ podman pod ps --ctr-status --ctr-names --ctr-ids
226 POD ID NAME STATUS CREATED INFRA ID IDS NAMES STATUS
227 00dfd6fa02c0 jolly_goldstine Running 31 hours ago ba465ab0a3a4 ba465ab0a3a4 loving_archimedes running
228 f4df8692e116 nifty_torvalds Created 10 minutes ago 331693bff40a 331693bff40a,8e428daeb89e thirsty_hawking,wizardly_golick configured,configured
229
230
231
232 $ podman pod ps --format "{{.ID}} {{.ContainerNames}} {{.Cgroup}}"
233 00dfd6fa02c0 loving_archimedes /libpod_parent
234 f4df8692e116 thirsty_hawking,wizardly_golick /libpod_parent
235
236
237
238 $ podman pod ps --sort id --filter ctr-number=2
239 POD ID NAME STATUS CREATED INFRA ID # OF CONTAINERS
240 f4df8692e116 nifty_torvalds Created 10 minutes ago 331693bff40a 2
241
242
243
244 $ podman pod ps --ctr-ids
245 POD ID NAME STATUS CREATED INFRA ID IDS
246 00dfd6fa02c0 jolly_goldstine Running 31 hours ago ba465ab0a3a4 ba465ab0a3a4
247 f4df8692e116 nifty_torvalds Created 10 minutes ago 331693bff40a 331693bff40a,8e428daeb89e
248
249
250
251 $ podman pod ps --no-trunc --ctr-ids
252 POD ID NAME STATUS CREATED INFRA ID IDS
253 00dfd6fa02c0a2daaedfdf8fcecd06f22ad114d46d167d71777224735f701866 jolly_goldstine Running 31 hours ago ba465ab0a3a4e15e3539a1e79c32d1213a02b0989371e274f98e0f1ae9de7050 ba465ab0a3a4e15e3539a1e79c32d1213a02b0989371e274f98e0f1ae9de7050
254 f4df8692e116a3e6d1d62572644ed36ca475d933808cc3c93435c45aa139314b nifty_torvalds Created 10 minutes ago 331693bff40a926b6d52b184e116afd15497610c378d5d4c42945dd6e33b75b0 331693bff40a926b6d52b184e116afd15497610c378d5d4c42945dd6e33b75b0,8e428daeb89e69b71e7916a13accfb87d122889442b5c05c2d99cf94a3230e9d
255
256
257
258 $ podman pod ps --ctr-names
259 POD ID NAME STATUS CREATED INFRA ID NAMES
260 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 ...
261
262
263
265 Print a list of pods
266
267
269 podman(1), podman-pod(1)
270
271
273 July 2018, Originally compiled by Peter Hunt pehunt@redhat.com
274 ⟨mailto:pehunt@redhat.com⟩
275
276
277
278 podman-pod-ps(1)