cgroup

package
v0.0.0-...-0350bc7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 28, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoLimit = errors.New("NoLimit")
)

Functions

func ParseKvContentInteger

func ParseKvContentInteger(content string, kv map[string]*int64) bool

func ParseSingleInteger

func ParseSingleInteger(content string) (int64, error)

Types

type ControlGroupV1

type ControlGroupV1 struct {
}

func NewControlGroupV1

func NewControlGroupV1() ControlGroupV1

func (ControlGroupV1) CpuCount

func (cg ControlGroupV1) CpuCount() (cnt int, err error)

func (ControlGroupV1) CpuUsageSeconds

func (cg ControlGroupV1) CpuUsageSeconds() (x float64, err error)

func (ControlGroupV1) GetCpuAcctUsage

func (cg ControlGroupV1) GetCpuAcctUsage() (x int64, err error)

func (ControlGroupV1) GetCpuCfsPeriodUs

func (cg ControlGroupV1) GetCpuCfsPeriodUs() (int64, error)

func (ControlGroupV1) GetCpuCfsQuotaUs

func (cg ControlGroupV1) GetCpuCfsQuotaUs() (int64, error)

func (ControlGroupV1) GetCpuStat

func (cg ControlGroupV1) GetCpuStat() (stat CpuStatV1, err error)

func (ControlGroupV1) GetMemoryLimitInBytes

func (cg ControlGroupV1) GetMemoryLimitInBytes() (x int64, err error)

func (ControlGroupV1) GetMemoryUsageInBytes

func (cg ControlGroupV1) GetMemoryUsageInBytes() (x int64, err error)

func (ControlGroupV1) MemorySize

func (cg ControlGroupV1) MemorySize() (x int64, err error)

func (ControlGroupV1) MemoryUsageBytes

func (cg ControlGroupV1) MemoryUsageBytes() (x int64, err error)

type ControlGroupV2

type ControlGroupV2 struct {
}

func NewControlGroupV2

func NewControlGroupV2() ControlGroupV2

func (ControlGroupV2) CpuCount

func (cg ControlGroupV2) CpuCount() (cnt int, err error)

func (ControlGroupV2) CpuUsageSeconds

func (cg ControlGroupV2) CpuUsageSeconds() (x float64, err error)

func (ControlGroupV2) GetCpuMax

func (cg ControlGroupV2) GetCpuMax() (maxTime, period int64, err error)

func (ControlGroupV2) GetCpuStat

func (cg ControlGroupV2) GetCpuStat() (stat CpuStat, err error)

func (ControlGroupV2) GetMemoryCurrent

func (cg ControlGroupV2) GetMemoryCurrent() (int64, error)

func (ControlGroupV2) GetMemoryMax

func (cg ControlGroupV2) GetMemoryMax() (x int64, err error)

func (ControlGroupV2) MemorySize

func (cg ControlGroupV2) MemorySize() (cnt int64, err error)

func (ControlGroupV2) MemoryUsageBytes

func (cg ControlGroupV2) MemoryUsageBytes() (x int64, err error)

func (ControlGroupV2) ParseCpuMax

func (cg ControlGroupV2) ParseCpuMax(content string) (maxTime, period int64, err error)

func (ControlGroupV2) ParseCpuStat

func (cg ControlGroupV2) ParseCpuStat(content string) (stat CpuStat, err error)

type CpuStat

type CpuStat struct {
	UsageUsec     int64
	UserUsec      int64
	SystemUsec    int64
	NrPeriods     int64
	NrThrottled   int64
	ThrottledUsec int64
}

type CpuStatV1

type CpuStatV1 struct {
	NrPeriods     int64
	NrThrottled   int64
	ThrottledTime int64
	CurrentBw     int64
	NrBurst       int64
	BurstTime     int64
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL