subsystem

package
v1.9.14 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CGroupPidPath

func CGroupPidPath(pid uint64) string

func MountInfoPidPath

func MountInfoPidPath(pid uint64) string

func ParamRead

func ParamRead(paramFilePath string, informer logger.Informer) (string, error)

Types

type CGroupSubSystem

type CGroupSubSystem struct {
	ID             uint8
	Name           CGroupSubSystemName
	MountPointRoot MountPointRootPath
}

func NewCGroupFromLine

func NewCGroupFromLine(line string, informer logger.Informer) ([]*CGroupSubSystem, error)

type CGroupSubSystemName

type CGroupSubSystemName string
const CPUSubSystem CGroupSubSystemName = "cpu"
const MemorySubSystem CGroupSubSystemName = "memory"

type CGroupSubSystems

type CGroupSubSystems map[CGroupSubSystemName]*CGroupSubSystem

func ParseCGroup

func ParseCGroup(processCGroupFilePath string, informer logger.Informer) (CGroupSubSystems, error)

type CGroupVersion

type CGroupVersion string

type CPU

type CPU struct {
	Quota  uint32
	Period uint32
}

type Memory

type Memory struct {
	Limit uint64
}

type MountPoint

type MountPoint struct {
	ID             uint32
	ParentID       uint32
	DeviceID       string
	Root           MountPointRootPath
	MountPoint     MountPointPath
	Options        []string
	OptionalFields []string
	FSType         CGroupVersion
	MountSource    string
	SuperOptions   []string
}

func NewMountPointFromLine

func NewMountPointFromLine(line string) (*MountPoint, error)

type MountPointPath

type MountPointPath string

type MountPointRootPath

type MountPointRootPath string

type MountPoints

type MountPoints map[uint32]*MountPoint

func ParseMountInfo

func ParseMountInfo(processMountInfoFilePath string, inormer logger.Informer) (MountPoints, error)

type SubSystems

type SubSystems struct {
	CGroupVersion CGroupVersion
	CPU           *CPU
	Memory        *Memory
}

Jump to

Keyboard shortcuts

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