fs2

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2024 License: Apache-2.0 Imports: 17 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const UnifiedMountpoint = "/sys/fs/cgroup"

Variables

This section is empty.

Functions

func CheckMemoryUsage added in v1.2.0

func CheckMemoryUsage(dirPath string, r *configs.Resources) error

func CreateCgroupPath

func CreateCgroupPath(path string, c *configs.Cgroup) (Err error)

CreateCgroupPath creates cgroupv2 path, enabling all the supported controllers.

func OOMKillCount

func OOMKillCount(path string) (uint64, error)

Types

type Manager added in v1.2.0

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

func NewManager

func NewManager(config *configs.Cgroup, dirPath string) (*Manager, error)

NewManager creates a manager for cgroup v2 unified hierarchy. dirPath is like "/sys/fs/cgroup/user.slice/user-1001.slice/session-1.scope". If dirPath is empty, it is automatically set using config.

func (*Manager) Apply added in v1.2.0

func (m *Manager) Apply(pid int) error

func (*Manager) Destroy added in v1.2.0

func (m *Manager) Destroy() error

func (*Manager) Exists added in v1.2.0

func (m *Manager) Exists() bool

func (*Manager) Freeze added in v1.2.0

func (m *Manager) Freeze(state configs.FreezerState) error

func (*Manager) GetAllPids added in v1.2.0

func (m *Manager) GetAllPids() ([]int, error)

func (*Manager) GetCgroups added in v1.2.0

func (m *Manager) GetCgroups() (*configs.Cgroup, error)

func (*Manager) GetFreezerState added in v1.2.0

func (m *Manager) GetFreezerState() (configs.FreezerState, error)

func (*Manager) GetPaths added in v1.2.0

func (m *Manager) GetPaths() map[string]string

func (*Manager) GetPids added in v1.2.0

func (m *Manager) GetPids() ([]int, error)

func (*Manager) GetStats added in v1.2.0

func (m *Manager) GetStats() (*cgroups.Stats, error)

func (*Manager) OOMKillCount added in v1.2.0

func (m *Manager) OOMKillCount() (uint64, error)

func (*Manager) Path added in v1.2.0

func (m *Manager) Path(_ string) string

func (*Manager) Set added in v1.2.0

func (m *Manager) Set(r *configs.Resources) error

Jump to

Keyboard shortcuts

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