MCPcopy Create free account
hub / github.com/containerd/cgroups / ParseCgroupFile

Function ParseCgroupFile

cgroup1/utils.go:199–202  ·  view source on GitHub ↗

ParseCgroupFile parses the given cgroup file, typically /proc/self/cgroup or /proc/ /cgroup, into a map of subsystems to cgroup paths, e.g. "cpu": "/user.slice/user-1000.slice" "pids": "/user.slice/user-1000.slice" etc. The resulting map does not have an element for cgroup v2 unified hierar

(path string)

Source from the content-addressed store, hash-verified

197// The resulting map does not have an element for cgroup v2 unified hierarchy.
198// Use [cgroups.ParseCgroupFileUnified] to get the unified path.
199func ParseCgroupFile(path string) (map[string]string, error) {
200 x, _, err := cgroups.ParseCgroupFileUnified(path)
201 return x, err
202}
203
204// ParseCgroupFileUnified returns legacy subsystem paths as the first value,
205// and returns the unified path as the second value.

Callers 4

NestedPathFunction · 0.85
PidPathFunction · 0.85
TestSelfPathFunction · 0.85
TestPidPathFunction · 0.85

Calls

no outgoing calls

Tested by 2

TestSelfPathFunction · 0.68
TestPidPathFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…