From 145540fed46994e47dae71f40be5d110f2eaaab9 Mon Sep 17 00:00:00 2001 From: Lokesh Mandvekar Date: Wed, 5 Nov 2025 11:22:02 -0500 Subject: [PATCH] Remove ContainerStats.PerCPU: CGV1 only Signed-off-by: Lokesh Mandvekar --- docs/source/locale/ja/LC_MESSAGES/markdown.po | 4 ---- libpod/define/containerstate.go | 1 - libpod/stats_linux.go | 1 - pkg/api/handlers/compat/containers_stats_linux.go | 1 - 4 files changed, 7 deletions(-) diff --git a/docs/source/locale/ja/LC_MESSAGES/markdown.po b/docs/source/locale/ja/LC_MESSAGES/markdown.po index e97a73b613..4ae143667a 100644 --- a/docs/source/locale/ja/LC_MESSAGES/markdown.po +++ b/docs/source/locale/ja/LC_MESSAGES/markdown.po @@ -26474,10 +26474,6 @@ msgstr "" msgid "Network Output" msgstr "" -#: ../../source/markdown/podman-stats.1.md:1 -msgid ".PerCPU" -msgstr "" - #: ../../source/markdown/podman-stats.1.md:1 msgid "CPU time consumed by all tasks [1]" msgstr "" diff --git a/libpod/define/containerstate.go b/libpod/define/containerstate.go index e967988861..a766010007 100644 --- a/libpod/define/containerstate.go +++ b/libpod/define/containerstate.go @@ -133,7 +133,6 @@ type ContainerStats struct { AvgCPU float64 ContainerID string Name string - PerCPU []uint64 CPU float64 CPUNano uint64 CPUSystemNano uint64 diff --git a/libpod/stats_linux.go b/libpod/stats_linux.go index 84f853bf89..bc4ea54101 100644 --- a/libpod/stats_linux.go +++ b/libpod/stats_linux.go @@ -69,7 +69,6 @@ func (c *Container) getPlatformContainerStats(stats *define.ContainerStats, prev stats.CPUNano = cgroupStats.CpuStats.CpuUsage.TotalUsage stats.CPUSystemNano = cgroupStats.CpuStats.CpuUsage.UsageInKernelmode stats.SystemNano = now - stats.PerCPU = cgroupStats.CpuStats.CpuUsage.PercpuUsage return nil } diff --git a/pkg/api/handlers/compat/containers_stats_linux.go b/pkg/api/handlers/compat/containers_stats_linux.go index 1773f05859..9b450c193f 100644 --- a/pkg/api/handlers/compat/containers_stats_linux.go +++ b/pkg/api/handlers/compat/containers_stats_linux.go @@ -20,7 +20,6 @@ func getPreCPUStats(stats *define.ContainerStats) CPUStats { return CPUStats{ CPUUsage: container.CPUUsage{ TotalUsage: stats.CPUNano, - PercpuUsage: stats.PerCPU, UsageInKernelmode: stats.CPUSystemNano, UsageInUsermode: stats.CPUNano - stats.CPUSystemNano, },