We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2a6e771 commit 16fa177Copy full SHA for 16fa177
cgroup/cgroup.go
@@ -73,7 +73,11 @@ type Cgroup struct {
73
}
74
75
func (cg *Cgroup) CreatedAt() time.Time {
76
- fi, err := os.Stat(path.Join(cgRoot, "cpu", cg.subsystems["cpu"]))
+ p := path.Join(cgRoot, cg.subsystems[""]) //v2
77
+ if cg.Version == V1 {
78
+ p = path.Join(cgRoot, "cpu", cg.subsystems["cpu"])
79
+ }
80
+ fi, err := os.Stat(p)
81
if err != nil {
82
if !common.IsNotExist(err) {
83
klog.Errorln(err)
0 commit comments