diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2019-11-04 08:40:10 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-04 08:40:10 +0100 |
commit | efc7f1557b4af90263f4f07e5e576b02e839fad1 (patch) | |
tree | ef26b3b5bcacd8f1abc06eb3d35defaa34539224 /pkg | |
parent | ca4c24cce1345ab8757cd9a590a0f099207150fa (diff) | |
parent | a84ab35dc809f9ebedb290db234abdf43afe5a21 (diff) | |
download | podman-efc7f1557b4af90263f4f07e5e576b02e839fad1.tar.gz podman-efc7f1557b4af90263f4f07e5e576b02e839fad1.tar.bz2 podman-efc7f1557b4af90263f4f07e5e576b02e839fad1.zip |
Merge pull request #4423 from giuseppe/fix-cpu-stats
stats: report correctly CPU usage
Diffstat (limited to 'pkg')
-rw-r--r-- | pkg/cgroups/cpu.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/cgroups/cpu.go b/pkg/cgroups/cpu.go index 03677f1ef..a43a76b22 100644 --- a/pkg/cgroups/cpu.go +++ b/pkg/cgroups/cpu.go @@ -81,14 +81,14 @@ func (c *cpuHandler) Stat(ctr *CgroupControl, m *Metrics) error { return err } if val, found := values["usage_usec"]; found { - usage.Kernel, err = strconv.ParseUint(cleanString(val[0]), 10, 0) + usage.Total, err = strconv.ParseUint(cleanString(val[0]), 10, 0) if err != nil { return err } usage.Kernel *= 1000 } if val, found := values["system_usec"]; found { - usage.Total, err = strconv.ParseUint(cleanString(val[0]), 10, 0) + usage.Kernel, err = strconv.ParseUint(cleanString(val[0]), 10, 0) if err != nil { return err } |