package cgroups
import "github.com/containerd/cgroups/v3"
Index ¶
- func ParseCgroupFileUnified(path string) (map[string]string, string, error)
- func ParseCgroupFromReaderUnified(r io.Reader) (map[string]string, string, error)
- func RunningInUserNS() bool
- type CGMode
Functions ¶
func ParseCgroupFileUnified ¶
ParseCgroupFileUnified returns legacy subsystem paths as the first value, and returns the unified path as the second value.
func ParseCgroupFromReaderUnified ¶
ParseCgroupFromReaderUnified returns legacy subsystem paths as the first value, and returns the unified path as the second value.
func RunningInUserNS ¶
func RunningInUserNS() bool
RunningInUserNS detects whether we are currently running in a user namespace. Copied from github.com/lxc/lxd/shared/util.go
Deprecated: use userns.RunningInUserNS.
Types ¶
type CGMode ¶
type CGMode int
CGMode is the cgroups mode of the host system
const ( // Unavailable cgroup mountpoint CGMode = iota // Legacy cgroups v1 Legacy // Hybrid with cgroups v1 and v2 controllers mounted Hybrid // Unified with only cgroups v2 mounted Unified )
func Mode ¶
func Mode() CGMode
Mode returns the cgroups mode running on the host
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
cgroup1 | |
cgroup1/stats | |
cgroup2 | |
cgroup2/stats |
- Version
- v3.0.5 (latest)
- Published
- Dec 17, 2024
- Platform
- linux/amd64
- Imports
- 9 packages
- Last checked
- 1 week ago –
Tools for package owners.