cgroup

package
v1.9.3 Latest Latest
Warning

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

Go to latest
Published: May 31, 2023 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetHierarchicalMemoryLimitCgroup1 added in v1.7.0

func GetHierarchicalMemoryLimitCgroup1(basePath string) int64

GetHierarchicalMemoryLimitCgroup1 returns hierarchical memory limit https://www.kernel.org/doc/Documentation/cgroup-v1/memory.txt

func GetMemoryLimit

func GetMemoryLimit(basePath string, totalMem int) int

GetMemoryLimit returns the cgroup's (v1 or v2) memory limit, or [totalMem] if there is no limit set. If using cgroups v1, hierarchical memory limit is also taken into consideration if there is no limit set.

- https://www.kernel.org/doc/Documentation/cgroup-v1/memory.txt

- https://www.kernel.org/doc/html/latest/admin-guide/cgroup-v2.html#memory-interface-files

func GetMemoryUsage

func GetMemoryUsage(basePath string) int64

GetMemoryUsage returns cgroup (v1 or v2) memory usage

Types

This section is empty.

Jump to

Keyboard shortcuts

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