github.com/containers/podman/v2@v2.2.2-0.20210501105131-c1e07d070c4c/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   * number of containers attached to pod
    16   * status of pod as defined by the following table
    17  
    18  |  **Status**  | **Description**                                 |
    19  | ------------ | ------------------------------------------------|
    20  | Created      | No containers running nor stopped               |
    21  | Running      | at least one container is running               |
    22  | Stopped      | At least one container stopped and none running |
    23  | Exited       | All containers stopped in pod                   |
    24  | Dead         | Error retrieving state                          |
    25  
    26  
    27  ## OPTIONS
    28  
    29  #### **--ctr-names**
    30  
    31  Includes the container names in the container info field
    32  
    33  #### **--ctr-ids**
    34  
    35  Includes the container IDs in the container info field
    36  
    37  #### **--ctr-status**
    38  
    39  Includes the container statuses in the container info field
    40  
    41  #### **--latest**, **-l**
    42  
    43  Show the latest pod created (all states)
    44  
    45  The latest option is not supported on the remote client.
    46  
    47  #### **--no-trunc**
    48  
    49  Display the extended information
    50  
    51  #### **--ns**
    52  
    53  Display namespace information of the pod
    54  
    55  #### **--quiet**, **-q**
    56  
    57  Print the numeric IDs of the pods only
    58  
    59  #### **--format**=*format*
    60  
    61  Pretty-print containers to JSON or using a Go template
    62  
    63  Valid placeholders for the Go template are listed below:
    64  
    65  |   **Placeholder**   | **Description**                                                                                 |
    66  | ------------------- | ----------------------------------------------------------------------------------------------- |
    67  | .ID                 | Container ID                                                                                    |
    68  | .Name               | Name of pod                                                                                     |
    69  | .Status             | Status of pod                                                                                   |
    70  | .Labels             | All the labels assigned to the pod                                                              |
    71  | .NumberOfContainers | Show the number of containers attached to pod                                                   |
    72  | .Cgroup             | Cgroup path of pod                                                                              |
    73  | .Created            | Creation time of pod                                                                            |
    74  | .InfraID            | Pod infra container ID                                                                          |
    75  #### **--sort**
    76  
    77  Sort by created, ID, name, status, or number of containers
    78  
    79  Default: created
    80  
    81  #### **--filter**, **-f**=*filter*
    82  
    83  Filter output based on conditions given.
    84  Multiple filters can be given with multiple uses of the --filter flag.
    85  Filters with the same key work inclusive with the only exception being
    86  `label` which is exclusive. Filters with different keys always work exclusive.
    87  
    88  Valid filters are listed below:
    89  
    90  | **Filter** | **Description**                                                                       |
    91  | ---------- | ------------------------------------------------------------------------------------- |
    92  | id         | [ID] Pod's ID (accepts regex)                                                         |
    93  | name       | [Name] Pod's name (accepts regex)                                                     |
    94  | label      | [Key] or [Key=Value] Label assigned to a container                                    |
    95  | status     | Pod's status: `stopped`, `running`, `paused`, `exited`, `dead`, `created`, `degraded` |
    96  | ctr-names  | Container name within the pod (accepts regex)                                         |
    97  | ctr-ids    | Container ID within the pod (accepts regex)                                           |
    98  | ctr-status | Container status within the pod                                                       |
    99  | ctr-number | Number of containers in the pod                                                       |
   100  
   101  #### **--help**, **-h**
   102  
   103  Print usage statement
   104  
   105  ## EXAMPLES
   106  
   107  ```
   108  $ podman pod ps
   109  POD ID         NAME              STATUS    NUMBER OF CONTAINERS
   110  00dfd6fa02c0   jolly_goldstine   Running   1
   111  f4df8692e116   nifty_torvalds    Created   2
   112  ```
   113  
   114  ```
   115  $ podman pod ps --ctr-names
   116  POD ID         NAME              STATUS    CONTAINER INFO
   117  00dfd6fa02c0   jolly_goldstine   Running   [ loving_archimedes ]
   118  f4df8692e116   nifty_torvalds    Created   [ thirsty_hawking ] [ wizardly_golick ]
   119  ```
   120  
   121  ```
   122  $ podman pod ps --ctr-status --ctr-names --ctr-ids
   123  POD ID         NAME              STATUS    CONTAINER INFO
   124  00dfd6fa02c0   jolly_goldstine   Running   [ ba465ab0a3a4 loving_archimedes Running ]
   125  f4df8692e116   nifty_torvalds    Created   [ 331693bff40a thirsty_hawking Created ] [ 8e428daeb89e wizardly_golick Created ]
   126  ```
   127  
   128  ```
   129  $ podman pod ps --format "{{.ID}}  {{.ContainerInfo}}  {{.Cgroup}}" --ctr-names
   130  00dfd6fa02c0      [ loving_archimedes ]                         /libpod_parent
   131  f4df8692e116      [ thirsty_hawking ] [ wizardly_golick ]       /libpod_parent
   132  ```
   133  
   134  ```
   135  $ podman pod ps --cgroup
   136  POD ID         NAME              STATUS    NUMBER OF CONTAINERS   CGROUP           USE POD CGROUP
   137  00dfd6fa02c0   jolly_goldstine   Running   1                      /libpod_parent   true
   138  f4df8692e116   nifty_torvalds    Created   2                      /libpod_parent   true
   139  ```
   140  
   141  ```
   142  $ podman pod ps --sort id --filter ctr-number=2
   143  POD ID         NAME             STATUS    NUMBER OF CONTAINERS
   144  f4df8692e116   nifty_torvalds   Created   2
   145  ```
   146  
   147  ```
   148  $ podman pod ps  --ctr-ids
   149  POD ID         NAME              STATUS    CONTAINER INFO
   150  00dfd6fa02c0   jolly_goldstine   Running   [ ba465ab0a3a4 ]
   151  f4df8692e116   nifty_torvalds    Created   [ 331693bff40a ] [ 8e428daeb89e ]
   152  ```
   153  
   154  ```
   155  $ podman pod ps --no-trunc --ctr-ids
   156  POD ID                                                             NAME              STATUS    CONTAINER INFO
   157  00dfd6fa02c0a2daaedfdf8fcecd06f22ad114d46d167d71777224735f701866   jolly_goldstine   Running   [ ba465ab0a3a4e15e3539a1e79c32d1213a02b0989371e274f98e0f1ae9de7050 ]
   158  f4df8692e116a3e6d1d62572644ed36ca475d933808cc3c93435c45aa139314b   nifty_torvalds    Created   [ 331693bff40a0ef2f05a3aba73ce49e3243108911927fff04d1f7fc44dda8022 ] [ 8e428daeb89e69b71e7916a13accfb87d122889442b5c05c2d99cf94a3230e9d ]
   159  ```
   160  
   161  ```
   162  $ podman pod ps --ctr-names
   163  POD ID         NAME   STATUS    CONTAINER INFO
   164  314f4da82d74   hi     Created   [ jovial_jackson ] [ hopeful_archimedes ] [ vibrant_ptolemy ] [ heuristic_jennings ] [ keen_raman ] [ hopeful_newton ] [ mystifying_bose ] [ silly_lalande ] [ serene_lichterman ] ...
   165  ```
   166  
   167  ## pod ps
   168  Print a list of pods
   169  
   170  ## SEE ALSO
   171  podman-pod(1)
   172  
   173  ## HISTORY
   174  July 2018, Originally compiled by Peter Hunt <pehunt@redhat.com>