cgroup

package
v1.6.4 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetHierarchicalMemoryLimit

func GetHierarchicalMemoryLimit(basePath string) int64

GetHierarchicalMemoryLimit 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