Versions in this module Expand all Collapse all v3 v3.4.10 Aug 29, 2022 v3.4.8 Aug 29, 2022 Changes in this version + const Blkio + const CPU + const CPUAcct + const CPUset + const Memory + const Pids + var ErrCgroupDeleted = errors.New("cgroup deleted") + var ErrCgroupV1Rootless = errors.New("no support for CGroups V1 in rootless environments") + var ErrStatCgroup = errors.New("no cgroup available for gathering user statistics") + func GetAvailableControllers(exclude map[string]controllerHandler, cgroup2 bool) ([]string, error) + func GetSystemCPUUsage() (uint64, error) + func GetUserConnection(uid int) (*systemdDbus.Conn, error) + func IsCgroup2UnifiedMode() (bool, error) + func UserOwnsCurrentSystemdCgroup() (bool, error) + type BlkIOEntry struct + Major uint64 + Minor uint64 + Op string + Value uint64 + type BlkioMetrics struct + IoServiceBytesRecursive []BlkIOEntry + type CPUMetrics struct + Usage CPUUsage + type CPUUsage struct + Kernel uint64 + PerCPU []uint64 + Total uint64 + type CgroupControl struct + func Load(path string) (*CgroupControl, error) + func New(path string, resources *spec.LinuxResources) (*CgroupControl, error) + func NewSystemd(path string) (*CgroupControl, error) + func (c *CgroupControl) AddPid(pid int) error + func (c *CgroupControl) CreateSystemdUnit(path string) error + func (c *CgroupControl) CreateSystemdUserUnit(path string, uid int) error + func (c *CgroupControl) Delete() error + func (c *CgroupControl) DeleteByPath(path string) error + func (c *CgroupControl) DeleteByPathConn(path string, conn *systemdDbus.Conn) error + func (c *CgroupControl) Stat() (*Metrics, error) + func (c *CgroupControl) Update(resources *spec.LinuxResources) error + type MemoryMetrics struct + Usage MemoryUsage + type MemoryUsage struct + Limit uint64 + Usage uint64 + type Metrics struct + Blkio BlkioMetrics + CPU CPUMetrics + Memory MemoryMetrics + Pids PidsMetrics + type PidsMetrics struct + Current uint64