diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-02-13 15:42:53 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-13 15:42:53 +0100 |
commit | cd9e6b4143c9b49c3a23f2ba3c1e1c4978c83134 (patch) | |
tree | 1a9b2c4d6630fee8ff40eba4666a0aa889a87b9b /libpod/stats.go | |
parent | f4b5e600a10f92335f46e004e011205d07ee146b (diff) | |
parent | 510fa4ebc8271f929753275428ae2b6047ecc8c7 (diff) | |
download | podman-cd9e6b4143c9b49c3a23f2ba3c1e1c4978c83134.tar.gz podman-cd9e6b4143c9b49c3a23f2ba3c1e1c4978c83134.tar.bz2 podman-cd9e6b4143c9b49c3a23f2ba3c1e1c4978c83134.zip |
Merge pull request #5172 from giuseppe/api-fix-cpu-stats
api: fix the CPU stats reported
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 |