Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

when use "podman pod stats --format '{{GO template}}'","--format" option doesn't work #2258

Closed
wenj1104 opened this issue Feb 2, 2019 · 0 comments
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.

Comments

@wenj1104
Copy link

wenj1104 commented Feb 2, 2019

/kind bug

Description

When i use podman pod stats --format to view resource usage statistics for the pods,if I use a Go template,--format option does not work.

Steps to reproduce the issue:

  1. create a pod.
# podman pod create
3cc2ebb00c7512f3ba41ef4f2d8c28181c89dad21b603fb9c4bba46ad20cfb51

# podman pod ps
POD ID         NAME             STATUS    CREATED          # OF CONTAINERS   INFRA ID
3cc2ebb00c75   sad_heisenberg   Running   16 seconds ago   1                 adae4b38c879
  1. use a GO template to view resource usage statistics.
# podman pod stats -l --no-stream --format "{{.MemUsage}}"

POD            CID            NAME         CPU %  MEM USAGE/ LIMIT    MEM %  NET IO              BLOCK IO            PIDS
3cc2ebb00c75   adae4b38c879   3cc2ebb00c   5.85%  1.032MB / 67.51GB   0.00%  978B / 6.541kB      -- / --             1

As you can see, the output of the command is not in the specified format.

Additional information you deem important (e.g. issue happens only occasionally):

Output of podman version:

Version:       1.0.0
Go Version:    go1.11.4
Git Commit:    "49780a1cf10d572edc4e1ea3b8a8429ce391d47d"
Built:         Mon Jan 14 15:38:17 2019
OS/Arch:       linux/amd64

Output of podman info:

host:
  BuildahVersion: 1.6-dev
  Conmon:
    package: podman-1.0.0-1.git82e8011.fc29.x86_64
    path: /usr/libexec/podman/conmon
    version: 'conmon version 1.12.0-dev, commit: 49780a1cf10d572edc4e1ea3b8a8429ce391d47d'
  Distribution:
    distribution: fedora
    version: "29"
  MemFree: 6033768448
  MemTotal: 67505704960
  OCIRuntime:
    package: runc-1.0.0-67.dev.git12f6a99.fc29.x86_64
    path: /usr/bin/runc
    version: |-
      runc version 1.0.0-rc6+dev
      commit: d164d9b08bf7fc96a931403507dd16bced11b865
      spec: 1.0.1-dev
  SwapFree: 33820766208
  SwapTotal: 33820766208
  arch: amd64
  cpus: 24
  hostname: fedora29
  kernel: 4.18.16-300.fc29.x86_64
  os: linux
  rootless: false
  uptime: 123h 51m 48.15s (Approximately 5.12 days)
insecure registries:
  registries: []
registries:
  registries:
  - docker.io
store:
  ConfigFile: /etc/containers/storage.conf
  ContainerStore:
    number: 2
  GraphDriverName: overlay
  GraphOptions: null
  GraphRoot: /var/lib/containers/storage
  GraphStatus:
    Backing Filesystem: extfs
    Native Overlay Diff: "true"
    Supports d_type: "true"
  ImageStore:
    number: 2
  RunRoot: /var/run/containers/storage
@openshift-ci-robot openshift-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Feb 2, 2019
@baude baude self-assigned this Feb 9, 2019
baude added a commit to baude/podman that referenced this issue Feb 10, 2019
Go templates were not being processed or printed correctly for podman
pod stats.  Added the ability to do templates as well as honor the
table identifier.

Fixes containers#2258

Signed-off-by: baude <bbaude@redhat.com>
baude added a commit to baude/podman that referenced this issue Feb 10, 2019
Go templates were not being processed or printed correctly for podman
pod stats.  Added the ability to do templates as well as honor the
table identifier.

Fixes containers#2258

Signed-off-by: baude <bbaude@redhat.com>
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 24, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.
Projects
None yet
Development

No branches or pull requests

3 participants