summaryrefslogtreecommitdiff
path: root/pkg/api/handlers/compat
diff options
context:
space:
mode:
authorGiuseppe Scrivano <gscrivan@redhat.com>2022-09-14 23:18:54 +0200
committerGiuseppe Scrivano <gscrivan@redhat.com>2022-09-15 00:51:56 +0200
commitcf2118eab3b736feb8018bcc9f4cdb548b7ab70a (patch)
tree460fbe6218c6d39e1cf39e1b323b4d685a4509ae /pkg/api/handlers/compat
parenta73b150e70804907bb2c10390da766a0c6bc7485 (diff)
downloadpodman-cf2118eab3b736feb8018bcc9f4cdb548b7ab70a.tar.gz
podman-cf2118eab3b736feb8018bcc9f4cdb548b7ab70a.tar.bz2
podman-cf2118eab3b736feb8018bcc9f4cdb548b7ab70a.zip
stats: map MaxUsage to the correct value
and make sure it is not set for cgroup v2 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Diffstat (limited to 'pkg/api/handlers/compat')
-rw-r--r--pkg/api/handlers/compat/containers_stats.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/api/handlers/compat/containers_stats.go b/pkg/api/handlers/compat/containers_stats.go
index c115b4181..16311ef1e 100644
--- a/pkg/api/handlers/compat/containers_stats.go
+++ b/pkg/api/handlers/compat/containers_stats.go
@@ -177,7 +177,7 @@ streamLabel: // A label to flatten the scope
PreCPUStats: preCPUStats,
MemoryStats: docker.MemoryStats{
Usage: cgroupStat.MemoryStats.Usage.Usage,
- MaxUsage: cgroupStat.MemoryStats.Usage.Limit,
+ MaxUsage: cgroupStat.MemoryStats.Usage.MaxUsage,
Stats: nil,
Failcnt: 0,
Limit: memoryLimit,