cgroups

package
v0.0.0-...-aff87ba Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2017 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultCgroupsRoot string = "/sys/fs/cgroup"

Variables

View Source
var ErrPidInNoContainer = errors.New("No container has your input pid.")

ErrPidInNoContainer is exported

Functions

func CheckContainerOOM

func CheckContainerOOM(ID string) (bool, error)

CheckContainerOOM searches memory.oom_control of this container oom_kill_disable 0 under_oom 0 if under_oom equals to 1, return true.

func ContainerPidNum

func ContainerPidNum(containerID string) (int, error)

ContainerPidNum returns pid number given ID container contains, and returns an error if not found or got an error

func ContainsPid

func ContainsPid(pid int) (string, error)

ContainsPid returns container ID if given pid in it, and returns an error if not found or got an error

func GetCgroupsRoot

func GetCgroupsRoot() string

GetCgroupsRoot gets cgroups root path in Docker environment

Types

This section is empty.

Jump to

Keyboard shortcuts

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