github.com/containers/podman/v5@v5.1.0-rc1/docs/source/markdown/podman-info.1.md (about)

     1  % podman-info 1
     2  
     3  ## NAME
     4  podman\-info - Display Podman related system information
     5  
     6  ## SYNOPSIS
     7  **podman info** [*options*]
     8  
     9  **podman system info** [*options*]
    10  
    11  ## DESCRIPTION
    12  
    13  Displays information pertinent to the host, current storage stats, configured container registries, and build of podman.
    14  
    15  
    16  ## OPTIONS
    17  
    18  #### **--format**, **-f**=*format*
    19  
    20  Change output format to "json" or a Go template.
    21  
    22  | **Placeholder**     | **Info pertaining to ...**              |
    23  | ------------------- | --------------------------------------- |
    24  | .Host ...           | ...the host on which podman is running  |
    25  | .Plugins ...        | ...external plugins                     |
    26  | .Registries ...     | ...configured registries                |
    27  | .Store ...          | ...the storage driver and paths         |
    28  | .Version ...        | ...podman version                       |
    29  
    30  Each of the above branch out into further subfields, more than can
    31  reasonably be enumerated in this document.
    32  
    33  ## EXAMPLES
    34  
    35  Run `podman info` for a YAML formatted response:
    36  ```
    37  $ podman info
    38  host:
    39    arch: amd64
    40    buildahVersion: 1.23.0
    41    cgroupControllers: []
    42    cgroupManager: systemd
    43    cgroupVersion: v2
    44    conmon:
    45      package: conmon-2.0.29-2.fc34.x86_64
    46      path: /usr/bin/conmon
    47      version: 'conmon version 2.0.29, commit: '
    48   cpu_utilization:
    49     idle_percent: 96.84
    50     system_percent: 0.71
    51     user_percent: 2.45
    52    cpus: 8
    53    distribution:
    54      distribution: fedora
    55      variant: workstation
    56      version: "34"
    57    eventLogger: journald
    58    hostname: localhost.localdomain
    59    idMappings:
    60      gidmap:
    61      - container_id: 0
    62        host_id: 3267
    63        size: 1
    64      - container_id: 1
    65        host_id: 100000
    66        size: 65536
    67      uidmap:
    68      - container_id: 0
    69        host_id: 3267
    70        size: 1
    71      - container_id: 1
    72        host_id: 100000
    73        size: 65536
    74    kernel: 5.13.13-200.fc34.x86_64
    75    linkmode: dynamic
    76    logDriver: journald
    77    memFree: 1833385984
    78    memTotal: 16401895424
    79    networkBackend: cni
    80    networkBackendInfo:
    81      backend: cni
    82      dns:
    83        package: podman-plugins-3.4.4-1.fc34.x86_64
    84        path: /usr/libexec/cni/dnsname
    85        version: |-
    86          CNI dnsname plugin
    87          version: 1.3.1
    88          commit: unknown
    89      package: |-
    90        containernetworking-plugins-1.0.1-1.fc34.x86_64
    91        podman-plugins-3.4.4-1.fc34.x86_64
    92      path: /usr/libexec/cni
    93    ociRuntime:
    94      name: crun
    95      package: crun-1.0-1.fc34.x86_64
    96      path: /usr/bin/crun
    97      version: |-
    98        crun version 1.0
    99        commit: 139dc6971e2f1d931af520188763e984d6cdfbf8
   100        spec: 1.0.0
   101        +SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +CRIU +YAJL
   102    os: linux
   103    pasta:
   104      executable: /usr/bin/passt
   105      package: passt-0^20221116.gace074c-1.fc34.x86_64
   106      version: |
   107        passt 0^20221116.gace074c-1.fc34.x86_64
   108        Copyright Red Hat
   109        GNU Affero GPL version 3 or later <https://www.gnu.org/licenses/agpl-3.0.html>
   110        This is free software: you are free to change and redistribute it.
   111        There is NO WARRANTY, to the extent permitted by law.
   112    remoteSocket:
   113      path: /run/user/3267/podman/podman.sock
   114    security:
   115      apparmorEnabled: false
   116      capabilities: CAP_CHOWN,CAP_DAC_OVERRIDE,CAP_FOWNER,CAP_FSETID,CAP_KILL,CAP_NET_BIND_SERVICE,CAP_SETFCAP,CAP_SETGID,CAP_SETPCAP,CAP_SETUID
   117      rootless: true
   118      seccompEnabled: true
   119      seccompProfilePath: /usr/share/containers/seccomp.json
   120      selinuxEnabled: true
   121    serviceIsRemote: false
   122    slirp4netns:
   123      executable: /bin/slirp4netns
   124      package: slirp4netns-1.1.12-2.fc34.x86_64
   125      version: |-
   126        slirp4netns version 1.1.12
   127        commit: 7a104a101aa3278a2152351a082a6df71f57c9a3
   128        libslirp: 4.4.0
   129        SLIRP_CONFIG_VERSION_MAX: 3
   130        libseccomp: 2.5.0
   131    swapFree: 15687475200
   132    swapTotal: 16886259712
   133    uptime: 47h 15m 9.91s (Approximately 1.96 days)
   134  plugins:
   135    log:
   136    - k8s-file
   137    - none
   138    - journald
   139    network:
   140    - bridge
   141    - macvlan
   142    volume:
   143    - local
   144  registries:
   145    search:
   146    - registry.fedoraproject.org
   147    - registry.access.redhat.com
   148    - docker.io
   149    - quay.io
   150  store:
   151    configFile: /home/dwalsh/.config/containers/storage.conf
   152    containerStore:
   153      number: 9
   154      paused: 0
   155      running: 1
   156      stopped: 8
   157    graphDriverName: overlay
   158    graphOptions: {}
   159    graphRoot: /home/dwalsh/.local/share/containers/storage
   160    graphRootAllocated: 510389125120
   161    graphRootUsed: 129170714624
   162    graphStatus:
   163      Backing Filesystem: extfs
   164      Native Overlay Diff: "true"
   165      Supports d_type: "true"
   166      Using metacopy: "false"
   167    imageCopyTmpDir: /home/dwalsh/.local/share/containers/storage/tmp
   168    imageStore:
   169      number: 5
   170    runRoot: /run/user/3267/containers
   171    transientStore: false
   172    volumePath: /home/dwalsh/.local/share/containers/storage/volumes
   173  version:
   174    APIVersion: 4.0.0
   175    Built: 1631648722
   176    BuiltTime: Tue Sep 14 15:45:22 2021
   177    GitCommit: 23677f92dd83e96d2bc8f0acb611865fb8b1a56d
   178    GoVersion: go1.16.6
   179    OsArch: linux/amd64
   180    Version: 4.0.0
   181  ```
   182  
   183  Run `podman info --format json` for a JSON formatted response:
   184  ```
   185  $ podman info --format json
   186  {
   187    "host": {
   188      "arch": "amd64",
   189      "buildahVersion": "1.23.0",
   190      "cgroupManager": "systemd",
   191      "cgroupVersion": "v2",
   192      "cgroupControllers": [],
   193      "conmon": {
   194        "package": "conmon-2.0.29-2.fc34.x86_64",
   195        "path": "/usr/bin/conmon",
   196        "version": "conmon version 2.0.29, commit: "
   197      },
   198      "cpus": 8,
   199      "distribution": {
   200        "distribution": "fedora",
   201        "version": "34"
   202      },
   203      "eventLogger": "journald",
   204      "hostname": "localhost.localdomain",
   205      "idMappings": {
   206        "gidmap": [
   207  	{
   208  	  "container_id": 0,
   209  	  "host_id": 3267,
   210  	  "size": 1
   211  	},
   212  	{
   213  	  "container_id": 1,
   214  	  "host_id": 100000,
   215  	  "size": 65536
   216  	}
   217        ],
   218        "uidmap": [
   219  	{
   220  	  "container_id": 0,
   221  	  "host_id": 3267,
   222  	  "size": 1
   223  	},
   224  	{
   225  	  "container_id": 1,
   226  	  "host_id": 100000,
   227  	  "size": 65536
   228  	}
   229        ]
   230      },
   231      "kernel": "5.13.13-200.fc34.x86_64",
   232      "logDriver": "journald",
   233      "memFree": 1785753600,
   234      "memTotal": 16401895424,
   235      "networkBackend": "cni",
   236      "networkBackendInfo": {
   237        "backend": "cni",
   238        "package": "containernetworking-plugins-1.0.1-1.fc34.x86_64\npodman-plugins-3.4.4-1.fc34.x86_64",
   239        "path": "/usr/libexec/cni",
   240        "dns": {
   241          "version": "CNI dnsname plugin\nversion: 1.3.1\ncommit: unknown",
   242          "package": "podman-plugins-3.4.4-1.fc34.x86_64",
   243          "path": "/usr/libexec/cni/dnsname"
   244        }
   245      },
   246      "ociRuntime": {
   247        "name": "crun",
   248        "package": "crun-1.0-1.fc34.x86_64",
   249        "path": "/usr/bin/crun",
   250        "version": "crun version 1.0\ncommit: 139dc6971e2f1d931af520188763e984d6cdfbf8\nspec: 1.0.0\n+SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +CRIU +YAJL"
   251      },
   252      "os": "linux",
   253      "remoteSocket": {
   254        "path": "/run/user/3267/podman/podman.sock"
   255      },
   256      "serviceIsRemote": false,
   257      "security": {
   258        "apparmorEnabled": false,
   259        "capabilities": "CAP_CHOWN,CAP_DAC_OVERRIDE,CAP_FOWNER,CAP_FSETID,CAP_KILL,CAP_NET_BIND_SERVICE,CAP_SETFCAP,CAP_SETGID,CAP_SETPCAP,CAP_SETUID",
   260        "rootless": true,
   261        "seccompEnabled": true,
   262        "seccompProfilePath": "/usr/share/containers/seccomp.json",
   263        "selinuxEnabled": true
   264      },
   265      "slirp4netns": {
   266        "executable": "/bin/slirp4netns",
   267        "package": "slirp4netns-1.1.12-2.fc34.x86_64",
   268        "version": "slirp4netns version 1.1.12\ncommit: 7a104a101aa3278a2152351a082a6df71f57c9a3\nlibslirp: 4.4.0\nSLIRP_CONFIG_VERSION_MAX: 3\nlibseccomp: 2.5.0"
   269      },
   270      "pasta": {
   271        "executable": "/usr/bin/passt",
   272        "package": "passt-0^20221116.gace074c-1.fc34.x86_64",
   273        "version": "passt 0^20221116.gace074c-1.fc34.x86_64\nCopyright Red Hat\nGNU Affero GPL version 3 or later \u003chttps://www.gnu.org/licenses/agpl-3.0.html\u003e\nThis is free software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitted by law.\n"
   274      },
   275      "swapFree": 15687475200,
   276      "swapTotal": 16886259712,
   277      "uptime": "47h 17m 29.75s (Approximately 1.96 days)",
   278      "linkmode": "dynamic"
   279    },
   280    "store": {
   281      "configFile": "/home/dwalsh/.config/containers/storage.conf",
   282      "containerStore": {
   283        "number": 9,
   284        "paused": 0,
   285        "running": 1,
   286        "stopped": 8
   287      },
   288      "graphDriverName": "overlay",
   289      "graphOptions": {
   290  
   291      },
   292      "graphRoot": "/home/dwalsh/.local/share/containers/storage",
   293      "graphStatus": {
   294        "Backing Filesystem": "extfs",
   295        "Native Overlay Diff": "true",
   296        "Supports d_type": "true",
   297        "Using metacopy": "false"
   298      },
   299      "imageCopyTmpDir": "/home/dwalsh/.local/share/containers/storage/tmp",
   300      "imageStore": {
   301        "number": 5
   302      },
   303      "runRoot": "/run/user/3267/containers",
   304      "volumePath": "/home/dwalsh/.local/share/containers/storage/volumes",
   305      "transientStore": false
   306    },
   307    "registries": {
   308      "search": [
   309    "registry.fedoraproject.org",
   310    "registry.access.redhat.com",
   311    "docker.io",
   312    "quay.io"
   313  ]
   314    },
   315    "plugins": {
   316      "volume": [
   317        "local"
   318      ],
   319      "network": [
   320        "bridge",
   321        "macvlan"
   322      ],
   323      "log": [
   324        "k8s-file",
   325        "none",
   326        "journald"
   327      ]
   328    },
   329    "version": {
   330      "APIVersion": "4.0.0",
   331      "Version": "4.0.0",
   332      "GoVersion": "go1.16.6",
   333      "GitCommit": "23677f92dd83e96d2bc8f0acb611865fb8b1a56d",
   334      "BuiltTime": "Tue Sep 14 15:45:22 2021",
   335      "Built": 1631648722,
   336      "OsArch": "linux/amd64"
   337    }
   338  }
   339  ```
   340  
   341  #### Extracting the list of container registries with a Go template
   342  
   343  If shell completion is enabled, type `podman info --format={{.` and then press `[TAB]` twice.
   344  
   345  ```
   346  $ podman info --format={{.
   347  {{.Host.         {{.Plugins.      {{.Registries}}  {{.Store.        {{.Version.
   348  ```
   349  
   350  Press `R` `[TAB]` `[ENTER]` to print the registries information.
   351  
   352  ```
   353  $ podman info -f {{.Registries}}
   354  map[search:[registry.fedoraproject.org registry.access.redhat.com docker.io quay.io]]
   355  $
   356  ```
   357  
   358  The output still contains a map and an array. The map value can be extracted with
   359  
   360  ```
   361  $ podman info -f '{{index .Registries "search"}}'
   362  [registry.fedoraproject.org registry.access.redhat.com docker.io quay.io]
   363  ```
   364  
   365  The array can be printed as one entry per line
   366  
   367  ```
   368  $ podman info -f '{{range index .Registries "search"}}{{.}}\n{{end}}'
   369  registry.fedoraproject.org
   370  registry.access.redhat.com
   371  docker.io
   372  quay.io
   373  
   374  ```
   375  
   376  #### Extracting the list of container registries from JSON with jq
   377  
   378  The command-line JSON processor [__jq__](https://stedolan.github.io/jq/) can be used to extract the list
   379  of container registries.
   380  
   381  ```
   382  $ podman info -f json | jq '.registries["search"]'
   383  [
   384    "registry.fedoraproject.org",
   385    "registry.access.redhat.com",
   386    "docker.io",
   387    "quay.io"
   388  ]
   389  ```
   390  
   391  The array can be printed as one entry per line
   392  
   393  ```
   394  $ podman info -f json | jq -r '.registries["search"] | .[]'
   395  registry.fedoraproject.org
   396  registry.access.redhat.com
   397  docker.io
   398  quay.io
   399  ```
   400  
   401  Note, the Go template struct fields start with upper case. When running `podman info` or `podman info --format=json`, the same names start with lower case.
   402  
   403  ## SEE ALSO
   404  **[podman(1)](podman.1.md)**, **[containers-registries.conf(5)](https://github.com/containers/image/blob/main/docs/containers-registries.conf.5.md)**, **[containers-storage.conf(5)](https://github.com/containers/storage/blob/main/docs/containers-storage.conf.5.md)**