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

Container stats API endpoint ( compat ) has not feature parity with docker #16139

Closed
lukasmrtvy opened this issue Oct 12, 2022 · 2 comments
Closed
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

@lukasmrtvy
Copy link

lukasmrtvy commented Oct 12, 2022

Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)

/kind bug

Description
Container stats API endpoint ( compat ) does not have feature parity with docker.

Steps to reproduce the issue:

  1. podman run -d --name foo nginx

  2. curl --unix-socket /run/podman/podman.sock "http://d/containers/$(podman inspect foo -f '{{.Id}}')/stats"

Describe the results you received:

{"read":"2022-10-12T14:26:59.720237086Z","preread":"2022-10-12T14:26:54.717104419Z","pids_stats":{"current":147},"blkio_stats":{"io_service_bytes_recursive":[{"major":80,"minor":202,"op":"read","value":0},{"major":80,"minor":202,"op":"write","value":5698093056},{"major":80,"minor":202,"op":"rios","value":0},{"major":80,"minor":202,"op":"wios","value":85994},{"major":80,"minor":202,"op":"dbytes","value":0},{"major":80,"minor":202,"op":"dios","value":0}],"io_serviced_recursive":null,"io_queue_recursive":null,"io_service_time_recursive":null,"io_wait_time_recursive":null,"io_merged_recursive":null,"io_time_recursive":null,"sectors_recursive":null},"num_procs":0,"storage_stats":{},"cpu_stats":{"cpu_usage":{"total_usage":407550299000,"usage_in_kernelmode":94477338,"usage_in_usermode":407455821662},"system_cpu_usage":2627940826000,"cpu":42.80735007281072,"throttling_data":{"periods":0,"throttled_periods":0,"throttled_time":0}},"precpu_stats":{"cpu_usage":{"total_usage":405414679000,"usage_in_kernelmode":93949401,"usage_in_usermode":405320729599},"system_cpu_usage":2618780116000,"cpu":43.78444593531734,"throttling_data":{"periods":0,"throttled_periods":0,"throttled_time":0}},"memory_stats":{"usage":345751552,"max_usage":18446744073709551615,"limit":2048000000},"name":"wa6yjvatElaClrFJG","Id":"0e2062dacaa804e28451357ac70038ad254e71e19568294fc64e74e0dc548b51","networks":{"network":{"rx_bytes":3635359,"rx_packets":0,"rx_errors":0,"rx_dropped":0,"tx_bytes":115407965,"tx_packets":0,"tx_errors":0,"tx_dropped":0}}}

Describe the results you expected:

{"read":"2022-10-12T14:32:16.4700444Z","preread":"0001-01-01T00:00:00Z","pids_stats":{"current":9},"blkio_stats":{"io_service_bytes_recursive":[],"io_serviced_recursive":[],"io_queue_recursive":[],"io_service_time_recursive":[],"io_wait_time_recursive":[],"io_merged_recursive":[],"io_time_recursive":[],"sectors_recursive":[]},"num_procs":0,"storage_stats":{},"cpu_stats":{"cpu_usage":{"total_usage":274531300,"percpu_usage":[7709900,9337300,18449100,8160300,37417900,106218600,40418200,46820000],"usage_in_kernelmode":200000000,"usage_in_usermode":50000000},"system_cpu_usage":171668350000000,"online_cpus":8,"throttling_data":{"periods":0,"throttled_periods":0,"throttled_time":0}},"precpu_stats":{"cpu_usage":{"total_usage":0,"usage_in_kernelmode":0,"usage_in_usermode":0},"throttling_data":{"periods":0,"throttled_periods":0,"throttled_time":0}},"memory_stats":{"usage":7208960,"max_usage":9412608,"stats":{"active_anon":0,"active_file":0,"cache":0,"dirty":0,"hierarchical_memory_limit":9223372036854771712,"hierarchical_memsw_limit":9223372036854771712,"inactive_anon":5394432,"inactive_file":0,"mapped_file":0,"pgfault":4653,"pgmajfault":0,"pgpgin":2904,"pgpgout":1571,"rss":5386240,"rss_huge":0,"total_active_anon":0,"total_active_file":0,"total_cache":0,"total_dirty":0,"total_inactive_anon":5394432,"total_inactive_file":0,"total_mapped_file":0,"total_pgfault":4653,"total_pgmajfault":0,"total_pgpgin":2904,"total_pgpgout":1571,"total_rss":5386240,"total_rss_huge":0,"total_unevictable":0,"total_writeback":0,"unevictable":0,"writeback":0},"limit":6642188288},"name":"/nginx","id":"a3a687bbc2c217c6853942896bc3db546e802a7d2f76288af878544da91b4969","networks":{"eth0":{"rx_bytes":1492,"rx_packets":14,"rx_errors":0,"rx_dropped":0,"tx_bytes":0,"tx_packets":0,"tx_errors":0,"tx_dropped":0}}}

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

Output of podman version:

Client:       Podman Engine
Version:      4.2.0
API Version:  4.2.0
Go Version:   go1.18.4
Built:        Thu Aug 11 14:42:17 2022
OS/Arch:      linux/amd64

Output of podman info:

host:
  arch: amd64
  buildahVersion: 1.27.0
  cgroupControllers:
  - cpuset
  - cpu
  - io
  - memory
  - hugetlb
  - pids
  - misc
  cgroupManager: systemd
  cgroupVersion: v2
  conmon:
    package: conmon-2.1.0-2.fc36.x86_64
    path: /usr/bin/conmon
    version: 'conmon version 2.1.0, commit: '
  cpuUtilization:
    idlePercent: 90.65
    systemPercent: 4.22
    userPercent: 5.13
  cpus: 16
  distribution:
    distribution: fedora
    variant: coreos
    version: "36"
  eventLogger: journald
  hostname: ip-10-2-17-98
  idMappings:
    gidmap: null
    uidmap: null
  kernel: 5.18.18-200.fc36.x86_64
  linkmode: dynamic
  logDriver: journald
  memFree: 121660846080
  memTotal: 128698798080
  networkBackend: netavark
  ociRuntime:
    name: crun
    package: crun-1.5-1.fc36.x86_64
    path: /usr/bin/crun
    version: |-
      crun version 1.5
      commit: 54ebb8ca8bf7e6ddae2eb919f5b82d1d96863dea
      spec: 1.0.0
      +SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +CRIU +YAJL
  os: linux
  remoteSocket:
    exists: true
    path: /run/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,CAP_SYS_CHROOT
    rootless: false
    seccompEnabled: true
    seccompProfilePath: /usr/share/containers/seccomp.json
    selinuxEnabled: true
  serviceIsRemote: false
  slirp4netns:
    executable: /usr/bin/slirp4netns
    package: slirp4netns-1.2.0-0.2.beta.0.fc36.x86_64
    version: |-
      slirp4netns version 1.2.0-beta.0
      commit: 477db14a24ff1a3de3a705e51ca2c4c1fe3dda64
      libslirp: 4.6.1
      SLIRP_CONFIG_VERSION_MAX: 3
      libseccomp: 2.5.3
  swapFree: 0
  swapTotal: 0
  uptime: 1h 38m 26.00s (Approximately 0.04 days)
plugins:
  authorization: null
  log:
  - k8s-file
  - none
  - passthrough
  - journald
  network:
  - bridge
  - macvlan
  volume:
  - local
registries:
  search:
  - docker.io
store:
  configFile: /usr/share/containers/storage.conf
  containerStore:
    number: 10
    paused: 0
    running: 10
    stopped: 0
  graphDriverName: overlay
  graphOptions:
    overlay.mountopt: nodev,metacopy=on
  graphRoot: /var/lib/containers/storage
  graphRootAllocated: 1098974756864
  graphRootUsed: 12329992192
  graphStatus:
    Backing Filesystem: xfs
    Native Overlay Diff: "false"
    Supports d_type: "true"
    Using metacopy: "true"
  imageCopyTmpDir: /var/tmp
  imageStore:
    number: 29
  runRoot: /run/containers/storage
  volumePath: /var/lib/containers/storage/volumes
version:
  APIVersion: 4.2.0
  Built: 1660228937
  BuiltTime: Thu Aug 11 14:42:17 2022
  GitCommit: ""
  GoVersion: go1.18.4
  Os: linux
  OsArch: linux/amd64
  Version: 4.2.0

Package info (e.g. output of rpm -q podman or apt list podman or brew info podman):

podman-4.2.0-2.fc36.x86_64

Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide? (https://github.com/containers/podman/blob/main/troubleshooting.md)

No

Additional environment details (AWS, VirtualBox, physical, etc.):
AWS EC2, Fedora CoreOS 36.20220820.3.0

@openshift-ci openshift-ci bot added the kind/bug Categorizes issue or PR as related to a bug. label Oct 12, 2022
@benoitf
Copy link
Contributor

benoitf commented Oct 12, 2022

I would say it's related to #15754

@lukasmrtvy
Copy link
Author

@benoitf Indeed, closing this

@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 13, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 13, 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

2 participants