summaryrefslogtreecommitdiff
path: root/libpod/stats.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-06-26 15:25:19 +0200
committerGitHub <noreply@github.com>2019-06-26 15:25:19 +0200
commit58a1777f518657ff12744bb69ccf2dab3d429625 (patch)
treea2264182e122e0d0cf29c609bb4856ac5beca7c6 /libpod/stats.go
parentda1ef2bdfd52e666a2561e0a012cc3a824938e65 (diff)
parente27fef335a4a0d2666542028986100a2f60b3e18 (diff)
downloadpodman-58a1777f518657ff12744bb69ccf2dab3d429625.tar.gz
podman-58a1777f518657ff12744bb69ccf2dab3d429625.tar.bz2
podman-58a1777f518657ff12744bb69ccf2dab3d429625.zip
Merge pull request #3374 from giuseppe/cgroups
cgroups: add initial support for cgroups v2
Diffstat (limited to 'libpod/stats.go')
-rw-r--r--libpod/stats.go7
1 files changed, 3 insertions, 4 deletions
diff --git a/libpod/stats.go b/libpod/stats.go
index 926a1a511..e003f145b 100644
--- a/libpod/stats.go
+++ b/libpod/stats.go
@@ -7,8 +7,8 @@ import (
"syscall"
"time"
- "github.com/containerd/cgroups"
"github.com/containers/libpod/libpod/define"
+ "github.com/containers/libpod/pkg/cgroups"
"github.com/pkg/errors"
)
@@ -34,14 +34,13 @@ func (c *Container) GetContainerStats(previousStats *ContainerStats) (*Container
if err != nil {
return nil, err
}
- v1CGroups := GetV1CGroups(getExcludedCGroups())
- cgroup, err := cgroups.Load(v1CGroups, cgroups.StaticPath(cgroupPath))
+ cgroup, err := cgroups.Load(cgroupPath)
if err != nil {
return stats, errors.Wrapf(err, "unable to load cgroup at %s", cgroupPath)
}
// Ubuntu does not have swap memory in cgroups because swap is often not enabled.
- cgroupStats, err := cgroup.Stat(cgroups.IgnoreNotExist)
+ cgroupStats, err := cgroup.Stat()
if err != nil {
return stats, errors.Wrapf(err, "unable to obtain cgroup stats")
}