diff options
author | Giuseppe Scrivano <gscrivan@redhat.com> | 2020-02-11 19:48:23 +0100 |
---|---|---|
committer | Giuseppe Scrivano <gscrivan@redhat.com> | 2020-02-11 22:24:14 +0100 |
commit | 6215e1bb218a86c217a66e34f2abd043feca8582 (patch) | |
tree | 9212cebe74e4385685ea2d496a73b11418102205 /libpod/stats.go | |
parent | 4bdfeed5bf9c467c8ab53b392747ec722505b179 (diff) | |
download | podman-6215e1bb218a86c217a66e34f2abd043feca8582.tar.gz podman-6215e1bb218a86c217a66e34f2abd043feca8582.tar.bz2 podman-6215e1bb218a86c217a66e34f2abd043feca8582.zip |
api: fix the CPU stats reported
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Diffstat (limited to 'libpod/stats.go')
-rw-r--r-- | libpod/stats.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libpod/stats.go b/libpod/stats.go index 3b5e0958c..6f42afd18 100644 --- a/libpod/stats.go +++ b/libpod/stats.go @@ -66,7 +66,9 @@ func (c *Container) GetContainerStats(previousStats *ContainerStats) (*Container } stats.BlockInput, stats.BlockOutput = calculateBlockIO(cgroupStats) stats.CPUNano = cgroupStats.CPU.Usage.Total + stats.CPUSystemNano = cgroupStats.CPU.Usage.Kernel stats.SystemNano = now + stats.PerCPU = cgroupStats.CPU.Usage.PerCPU // Handle case where the container is not in a network namespace if netStats != nil { stats.NetInput = netStats.TxBytes |