Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func GetSystemCPUUsage ¶
GetSystemCPUUsage returns the system usage for all the cgroups
func IsCgroup2UnifiedMode ¶
IsCgroup2UnifiedMode returns whether we are running in cgroup 2 cgroup2 mode.
func UserOwnsCurrentSystemdCgroup ¶
UserOwnsCurrentSystemdCgroup checks whether the current EUID owns the current cgroup.
Types ¶
type CPUAcct ¶
type CPUAcct struct {
// contains filtered or unexported fields
}
CPUAcct cpuacct control group controller
type CgroupControl ¶
CgroupControl represents a cgroup controller
func CgroupControlFactory ¶
func CgroupControlFactory(ct ControlType, path string) (CgroupControl, error)
CgroupControlFactory generates CgroupControl type based on specified type
type ControlType ¶
type ControlType int
ControlType supported cgroup controller types
const ( CPUAcctT ControlType = iota MemoryT )
func (ControlType) String ¶
func (ct ControlType) String() string
Click to show internal directories.
Click to hide internal directories.