ratz/src/system/capacity/cgroups/cgroups.go

const _cgroupFSType

const _cgroupSubsysCPU

const _cgroupSubsysCPUAcct

const _cgroupSubsysCPUSet

const _cgroupSubsysMemory

const _cgroupCPUCFSQuotaUsParam

const _cgroupCPUCFSPeriodUsParam

const _cgroupMemCurrentUsage

const _cgroupMemMaxUsage

const _cgroupMemLimit

const _procPathCGroup

const _procPathMountInfo

type CGroups

// NewCGroups returns a new *CGroups from given `mountinfo` and `cgroup` files
// under for some process under `/proc` file system (see also proc(5) for more
// information).
func NewCGroups(procPathMountInfo, procPathCGroup string) (CGroups, error) {}

// NewCGroupsForCurrentProcess returns a new *CGroups instance for the current
// process.
func NewCGroupsForCurrentProcess() (CGroups, error) {}

// CPUQuota returns the CPU quota applied with the CPU cgroup controller.
// It is a result of `cpu.cfs_quota_us / cpu.cfs_period_us`. If the value of
// `cpu.cfs_quota_us` was not set (-1), the method returns `(-1, nil)`.
func (cg CGroups) CPUQuota() (float64, bool, error) {}

func (cg CGroups) MemQuota() (currentUsage, maxUsage, memLimit int, err error) {}