summaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-11-04 08:40:10 +0100
committerGitHub <noreply@github.com>2019-11-04 08:40:10 +0100
commitefc7f1557b4af90263f4f07e5e576b02e839fad1 (patch)
treeef26b3b5bcacd8f1abc06eb3d35defaa34539224 /pkg
parentca4c24cce1345ab8757cd9a590a0f099207150fa (diff)
parenta84ab35dc809f9ebedb290db234abdf43afe5a21 (diff)
downloadpodman-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.go4
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
}