podman-info(1)

πŸ’… podman-info(1) β€” like, the whole vibe of podman-info

okay so bestie, welcome to podman-info(1), from the General Commands Manual section. this is the page where podman spills all its tea about the system it's living on. πŸ«–βœ¨

✨ NAME ✨

podman-info β€” Display Podman related system information

like, it shows you stuff. about podman. system stuff. iykyk.

πŸ¦‹ SYNOPSIS πŸ¦‹

podman info [options]

podman system info [options]

two ways in, same destination. podman system info is the lorg version, podman info is the lowkey shortcut. both slay.

🌸 DESCRIPTION 🌸

so what does it actually do? it Displays information pertinent to the host, current storage stats, configured container registries, and build of podman. basically the full carfax on your setup. πŸ’…

and the host info? it includes configured CDI spec directories and resolved CDI devices when present. so if you've got CDI stuff configured, it shows up. if not, it's giving nothing and that's fine too.

πŸŽ€ OPTIONS πŸŽ€

⭐ --format, -f=format

Change output format to "json" or a Go template.

no cap, this is the main character option. you want json? say json. you want a Go template? go off, build your own lil formatted masterpiece. 🌈

here's the placeholder tea β€” when you're templating, these are the top-level spots you can reach into:

  • .Host ... β€” Info pertaining to ...the host on which podman is running πŸ’»
  • .Plugins ... β€” Info pertaining to ...external plugins πŸ”Œ
  • .Registries ... β€” Info pertaining to ...configured registries πŸ“‹
  • .Store ... β€” Info pertaining to ...the storage driver and paths πŸ’Ύ
  • .Version ... β€” Info pertaining to ...podman version 🏷️
ngl, this is where the original had a cute lil table. we've gone with a list 'cause tables are so not invited to this party. same facts tho, fr fr.

Each of the above branch out into further subfields, more than can reasonably be enumerated in this document. so like, there's a whole tree under each one β€” .Host alone has a million little branches β€” and the manpage authors were like "bestie we're not typing all that out." respect honestly. πŸ™ˆ

so if you're writing a template and you're like "what fields exist under .Store?" β€” the answer is "a lot, go look." 🧚

✨ EXAMPLES ✨

okay bestie, run podman info to get that YAML formatted response, and it's literally giving full system lore:

$ podman info
host:
  arch: amd64
  buildahVersion: 1.23.0
  cgroupControllers: []
  cgroupManager: systemd
  cgroupVersion: v2
  conmon:
    package: conmon-2.0.29-2.fc34.x86_64
    path: /usr/bin/conmon
    version: 'conmon version 2.0.29, commit: '
 cpu_utilization:
   idle_percent: 96.84
   system_percent: 0.71
   user_percent: 2.45
  cpus: 8
  distribution:
    distribution: fedora
    variant: workstation
    version: "34"
  eventLogger: journald
  hostname: localhost.localdomain
  idMappings:
    gidmap:
    - container_id: 0
      host_id: 3267
      size: 1
    - container_id: 1
      host_id: 100000
      size: 65536
    uidmap:
    - container_id: 0
      host_id: 3267
      size: 1
    - container_id: 1
      host_id: 100000
      size: 65536
  kernel: 5.13.13-200.fc34.x86_64
  linkmode: dynamic
  logDriver: journald
  memAvailable: 14567456768
  memFree: 1833385984
  memTotal: 16401895424
  networkBackend: netavark
  networkBackendInfo:
    backend: netavark
    dns:
      package: aardvark-dns-1.0.1-1.fc34.x86_64
      path: /usr/libexec/podman/aardvark-dns
      version: aardvark-dns 1.0.1
    package: netavark-1.0.1-1.fc34.x86_64
    path: /usr/libexec/podman/netavark
    version: netavark 1.0.1
  ociRuntime:
    name: crun
    package: crun-1.0-1.fc34.x86_64
    path: /usr/bin/crun
    version: |-
      crun version 1.0
      commit: 139dc6971e2f1d931af520188763e984d6cdfbf8
      spec: 1.0.0
      +SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +CRIU +YAJL
  os: linux
  rootlessPortForwarder: rootlessport
  pasta:
    executable: /usr/bin/passt
    package: passt-0^20221116.gace074c-1.fc34.x86_64
    version: |
      passt 0^20221116.gace074c-1.fc34.x86_64
      Copyright Red Hat
      GNU Affero GPL version 3 or later <https://www.gnu.org/licenses/agpl-3.0.html>
      This is free software: you are free to change and redistribute it.
      There is NO WARRANTY, to the extent permitted by law.
  remoteSocket:
    path: /run/user/3267/podman/podman.sock
  security:
    apparmorEnabled: false
    capabilities: CAP_CHOWN,CAP_DAC_OVERRIDE,CAP_FOWNER,CAP_FSETID,CAP_KILL,CAP_NET_BIND_SERVICE,CAP_SETFCAP,CAP_SETGID,CAP_SETPCAP,CAP_SETUID
    rootless: true
    seccompEnabled: true
    seccompProfilePath: /usr/share/containers/seccomp.json
    selinuxEnabled: true
  serviceIsRemote: false
  swapFree: 15687475200
  swapTotal: 16886259712
  uptime: 47h 15m 9.91s (Approximately 1.96 days)
plugins:
  log:
  - k8s-file
  - none
  - journald
  network:
  - bridge
  - macvlan
  volume:
  - local
registries:
  search:
  - registry.fedoraproject.org
  - registry.access.redhat.com
  - docker.io
  - quay.io
store:
  containerStore:
    number: 9
    paused: 0
    running: 1
    stopped: 8
  graphDriverName: overlay
  graphOptions: {}
  graphRoot: /home/dwalsh/.local/share/containers/storage
  graphRootAllocated: 510389125120
  graphRootUsed: 129170714624
  graphStatus:
    Backing Filesystem: extfs
    Native Overlay Diff: "true"
    Supports d_type: "true"
    Using metacopy: "false"
  imageCopyTmpDir: /home/dwalsh/.local/share/containers/storage/tmp
  imageStore:
    number: 5
  runRoot: /run/user/3267/containers
  transientStore: false
  volumePath: /home/dwalsh/.local/share/containers/storage/volumes
version:
  APIVersion: 4.0.0
  Built: 1631648722
  BuiltTime: Tue Sep 14 15:45:22 2021
  GitCommit: 23677f92dd83e96d2bc8f0acb611865fb8b1a56d
  GoVersion: go1.16.6
  OsArch: linux/amd64
  Version: 4.0.0

and if you want that JSON formatted response, run podman info --format json β€” it's the same info but in curly-brace couture:

$ podman info --format json
{
  "host": {
    "arch": "amd64",
    "buildahVersion": "1.23.0",
    "cgroupManager": "systemd",
    "cgroupVersion": "v2",
    "cgroupControllers": [],
    "conmon": {
      "package": "conmon-2.0.29-2.fc34.x86_64",
      "path": "/usr/bin/conmon",
      "version": "conmon version 2.0.29, commit: "
    },
    "cpus": 8,
    "distribution": {
      "distribution": "fedora",
      "version": "34"
    },
    "eventLogger": "journald",
    "hostname": "localhost.localdomain",
    "idMappings": {
      "gidmap": [
     {
       "container_id": 0,
       "host_id": 3267,
       "size": 1
     },
     {
       "container_id": 1,
       "host_id": 100000,
       "size": 65536
     }
      ],
      "uidmap": [
     {
       "container_id": 0,
       "host_id": 3267,
       "size": 1
     },
     {
       "container_id": 1,
       "host_id": 100000,
       "size": 65536
     }
      ]
    },
    "kernel": "5.13.13-200.fc34.x86_64",
    "logDriver": "journald",
    "memAvailable": 14567456768,
    "memFree": 1785753600,
    "memTotal": 16401895424,
    "networkBackend": "netavark",
    "networkBackendInfo": {
      "backend": "netavark",
      "package": "netavark-1.0.1-1.fc34.x86_64",
      "path": "/usr/libexec/podman/netavark",
      "version": "netavark 1.0.1",
      "dns": {
        "version": "aardvark-dns 1.0.1",
        "package": "aardvark-dns-1.0.1-1.fc34.x86_64",
        "path": "/usr/libexec/podman/aardvark-dns"
      }
    },
    "ociRuntime": {
      "name": "crun",
      "package": "crun-1.0-1.fc34.x86_64",
      "path": "/usr/bin/crun",
      "version": "crun version 1.0\ncommit: 139dc6971e2f1d931af520188763e984d6cdfbf8\nspec: 1.0.0\n+SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +CRIU +YAJL"
    },
    "os": "linux",
    "rootlessPortForwarder": "rootlessport",
    "remoteSocket": {
      "path": "/run/user/3267/podman/podman.sock"
    },
    "serviceIsRemote": false,
    "security": {
      "apparmorEnabled": false,
      "capabilities": "CAP_CHOWN,CAP_DAC_OVERRIDE,CAP_FOWNER,CAP_FSETID,CAP_KILL,CAP_NET_BIND_SERVICE,CAP_SETFCAP,CAP_SETGID,CAP_SETPCAP,CAP_SETUID",
      "rootless": true,
      "seccompEnabled": true,
      "seccompProfilePath": "/usr/share/containers/seccomp.json",
      "selinuxEnabled": true
    },
    "pasta": {
      "executable": "/usr/bin/passt",
      "package": "passt-0^20221116.gace074c-1.fc34.x86_64",
      "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"
    },
    "swapFree": 15687475200,
    "swapTotal": 16886259712,
    "uptime": "47h 17m 29.75s (Approximately 1.96 days)",
    "linkmode": "dynamic"
  },
  "store": {
    "configFile": "/home/dwalsh/.config/containers/storage.conf",
    "containerStore": {
      "number": 9,
      "paused": 0,
      "running": 1,
      "stopped": 8
    },
    "graphDriverName": "overlay",
    "graphOptions": {

    },
    "graphRoot": "/home/dwalsh/.local/share/containers/storage",
    "graphStatus": {
      "Backing Filesystem": "extfs",
      "Native Overlay Diff": "true",
      "Supports d_type": "true",
      "Using metacopy": "false"
    },
    "imageCopyTmpDir": "/home/dwalsh/.local/share/containers/storage/tmp",
    "imageStore": {
      "number": 5
    },
    "runRoot": "/run/user/3267/containers",
    "volumePath": "/home/dwalsh/.local/share/containers/storage/volumes",
    "transientStore": false
  },
  "registries": {
    "search": [
  "registry.fedoraproject.org",
  "registry.access.redhat.com",
  "docker.io",
  "quay.io"
]
  },
  "plugins": {
    "volume": [
      "local"
    ],
    "network": [
      "bridge",
      "macvlan"
    ],
    "log": [
      "k8s-file",
      "none",
      "journald"
    ]
  },
  "version": {
    "APIVersion": "4.0.0",
    "Version": "4.0.0",
    "GoVersion": "go1.16.6",
    "GitCommit": "23677f92dd83e96d2bc8f0acb611865fb8b1a56d",
    "BuiltTime": "Tue Sep 14 15:45:22 2021",
    "Built": 1631648722,
    "OsArch": "linux/amd64"
  }
}

🧚 Extracting the list of container registries with a Go template πŸ’…

if shell completion is enabled, type podman info --format={{. and then press Tab twice. it'll bless you with:

$ podman info --format={{.
{{.Host.         {{.Plugins.      {{.Registries}}  {{.Store.        {{.Version.

press R, Tab, Enter to print the registries information:

$ podman info -f {{.Registries}}
map[search:[registry.fedoraproject.org registry.access.redhat.com docker.io quay.io]]
$

the output still contains a map and an array. the map value can be extracted with:

$ podman info -f '{{index .Registries "search"}}'
[registry.fedoraproject.org registry.access.redhat.com docker.io quay.io]

and the array can be printed as one entry per line:

$ podman info -f '{{range index .Registries "search"}}{{.}}\n{{end}}'
registry.fedoraproject.org
registry.access.redhat.com
docker.io
quay.io

πŸ“ Extracting the list of container registries from JSON with jq πŸ¦‹

the command-line JSON processor jq can be used to extract the list of container registries:

$ podman info -f json | jq '.registries["search"]'
[
  "registry.fedoraproject.org",
  "registry.access.redhat.com",
  "docker.io",
  "quay.io"
]

the array can be printed as one entry per line:

$ podman info -f json | jq -r '.registries["search"] | .[]'
registry.fedoraproject.org
registry.access.redhat.com
docker.io
quay.io
⚠️ tiny but important 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. iykyk πŸ’…

πŸ’– SEE ALSO πŸ’–


that's the whole vibe, bestie β€” this was podman-info(1), signing off with immaculate system-info energy πŸ«Άβœ¨πŸ’…

πŸ“¦ where this page comes from