cgroups

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2025 License: Apache-2.0 Imports: 8 Imported by: 11

Documentation

Index

Constants

View Source
const (
	NoVersion SystemVersion = 0
	Version1  SystemVersion = 1
	Version2  SystemVersion = 2

	NoManager      Manager = ""
	NoneManager    Manager = "none"
	SystemdManager Manager = "systemd"

	NoNsMode      Mode = ""
	HostNsMode    Mode = "host"
	PrivateNsMode Mode = "private"
)

Variables

View Source
var (
	ErrNoMemoryController = errors.New("no systemd memory controller found")
	ErrNoCPUController    = errors.New("no systemd cpu controller found")
	ErrNoIoController     = errors.New("no systemd io controller found")
	ErrNoCPUSetController = errors.New("no systemd cpuset controller found")
	ErrNoPidsController   = errors.New("no systemd pids controller found")
)

Functions

func CalculateIO

func CalculateIO(metrics *stats.Metrics) (uint64, uint64)

func CalculateMemUsage

func CalculateMemUsage(metrics *stats.Metrics) float64

Types

type Controller

type Controller string

type Info

type Info struct {
	// contains filtered or unexported fields
}

func New

func New(pth string) (*Info, []error, error)

type Manager

type Manager string

func AvailableManagers

func AvailableManagers() []Manager

func DefaultManager

func DefaultManager() Manager

type Metrics

type Metrics = stats.Metrics

type Mode

type Mode string

func AvailableModes

func AvailableModes() []Mode

func DefaultMode

func DefaultMode() Mode

type SystemVersion

type SystemVersion int

func Version

func Version() SystemVersion

Jump to

Keyboard shortcuts

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