Red Hat Training

A Red Hat training course is available for RHEL 8

10.2. Visualización de la información del sistema Podman

El comando podman system le permite gestionar los sistemas Podman. Esta sección proporciona información sobre cómo mostrar la información del sistema Podman.

Procedimiento

  • Muestra la información del sistema Podman:

    • Para mostrar el uso del disco de Podman, introduzca:

      $ podman system df
      TYPE            TOTAL   ACTIVE   SIZE    RECLAIMABLE
      Images          3       1        255MB   255MB (100%)
      Containers      1       0        0B      0B (0%)
      Local Volumes   0       0        0B      0B (0%)
    • Para mostrar información detallada sobre el uso del espacio, introduzca:

      $ podman system df -v
      Images space usage:
      
      REPOSITORY                            TAG      IMAGE ID       CREATED         SIZE     SHARED SIZE   UNQUE SIZE   CONTAINERS
      docker.io/library/alpine              latest   e7d92cdc71fe   3 months ago    5.86MB   0B            5.86MB       0
      registry.access.redhat.com/ubi8/ubi   latest   8121a9f5303b   6 weeks ago     240MB    0B            240MB        1
      quay.io/libpod/alpine_nginx           latest   3ef70f7291f4   18 months ago   9.21MB   0B            9.21MB       0
      
      Containers space usage:
      
      CONTAINER ID    IMAGE   COMMAND     LOCAL VOLUMES   SIZE   CREATED          STATUS   NAMES
      ff0167c6c271    8121    /bin/bash   0               0B     10 seconds ago   exited   playTest
      
      Local Volumes space usage:
      
      VOLUME NAME   LINKS   SIZE
    • Para mostrar información sobre el host, las estadísticas de almacenamiento actuales y la compilación de Podman, introduzca:

      $ podman system info
      host:
        arch: amd64
        buildahVersion: 1.15.0
        cgroupVersion: v1
        conmon:
          package: conmon-2.0.18-1.module+el8.3.0+7084+c16098dd.x86_64
          path: /usr/bin/conmon
          version: 'conmon version 2.0.18, commit: 7fd3f71a218f8d3a7202e464252aeb1e942d17eb'
        cpus: 1
        distribution:
          distribution: '"rhel"'
          version: "8.3"
        eventLogger: file
        hostname: localhost.localdomain
        idMappings:
          gidmap:
          - container_id: 0
            host_id: 1000
            size: 1
          - container_id: 1
            host_id: 100000
            size: 65536
          uidmap:
          - container_id: 0
            host_id: 1000
            size: 1
          - container_id: 1
            host_id: 100000
            size: 65536
        kernel: 4.18.0-227.el8.x86_64
        linkmode: dynamic
        memFree: 69713920
        memTotal: 1376636928
        ociRuntime:
          name: runc
          package: runc-1.0.0-66.rc10.module+el8.3.0+7084+c16098dd.x86_64
          path: /usr/bin/runc
          version: 'runc version spec: 1.0.1-dev'
        os: linux
        remoteSocket:
          path: /run/user/1000/podman/podman.sock
        rootless: true
        slirp4netns:
          executable: /usr/bin/slirp4netns
          package: slirp4netns-1.1.1-1.module+el8.3.0+7084+c16098dd.x86_64
          version: |-
            slirp4netns version 1.1.1
            commit: bbf27c5acd4356edb97fa639b4e15e0cd56a39d5
            libslirp: 4.3.0
            SLIRP_CONFIG_VERSION_MAX: 3
        swapFree: 1833693184
        swapTotal: 2147479552
        uptime: 145h 19m 14.55s (Approximately 6.04 days)
      registries:
        search:
        - registry.access.redhat.com
        - registry.redhat.io
        - docker.io
      store:
        configFile: /home/user/.config/containers/storage.conf
        containerStore:
          number: 1
          paused: 0
          running: 0
          stopped: 1
        graphDriverName: overlay
        graphOptions:
          overlay.mount_program:
            Executable: /usr/bin/fuse-overlayfs
            Package: fuse-overlayfs-1.1.1-1.module+el8.3.0+7121+472bc0cf.x86_64
            Version: |-
              fuse-overlayfs: version 1.1.0
              FUSE library version 3.2.1
              using FUSE kernel interface version 7.26
        graphRoot: /home/user/.local/share/containers/storage
        graphStatus:
          Backing Filesystem: xfs
          Native Overlay Diff: "false"
          Supports d_type: "true"
          Using metacopy: "false"
        imageStore:
          number: 15
        runRoot: /run/user/1000/containers
        volumePath: /home/user/.local/share/containers/storage/volumes
      version:
        APIVersion: 1
        Built: 0
        BuiltTime: Thu Jan  1 01:00:00 1970
        GitCommit: ""
        GoVersion: go1.14.2
        OsArch: linux/amd64
        Version: 2.0.0
    • Para eliminar todos los contenedores, imágenes y datos de volumen no utilizados, introduzca:

      $ podman system prune
      WARNING! This will remove:
              - all stopped containers
              - all stopped pods
              - all dangling images
              - all build cache
      Are you sure you want to continue? [y/N] y
      • El comando podman system prune elimina todos los contenedores no utilizados (tanto los colgados como los no referenciados), los pods y, opcionalmente, los volúmenes del almacenamiento local.
      • Utilice la opción --all para eliminar todas las imágenes no utilizadas. Las imágenes no utilizadas son imágenes colgantes y cualquier imagen que no tenga ningún contenedor basado en ella.
      • Utilice la opción --volume para podar volúmenes. Por defecto, los volúmenes no se eliminan para evitar que se borren datos importantes si actualmente no hay ningún contenedor que utilice el volumen.

Recursos adicionales

  • Para más información sobre el comando podman system df, escriba man podman-system-df.
  • Para más información sobre el comando podman system info, escriba man podman-system-info.
  • Para más información sobre el comando podman system prune, escriba man podman-system-prune.