subsystem

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2023 License: MIT Imports: 6 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) (string, error)

Types

type CGroupSubSystem

type CGroupSubSystem struct {
	ID             uint8
	Name           CGroupSubSystemName
	MountPointRoot MountPointRootPath
}

func NewCGroupFromLine

func NewCGroupFromLine(line string) ([]*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) (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) (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