proc

package
v3.1.0-rc2+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2019 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CountChilds

func CountChilds(pid int) (int, error)

CountChilds returns the number of child processes for a given process id

func ExtractPid

func ExtractPid(path string) (pid uint, err error)

ExtractPid returns a pid extracted from path of type "/proc/1"

func HasFilesystem

func HasFilesystem(fs string) (bool, error)

HasFilesystem returns whether kernel support filesystem or not

func HasNamespace

func HasNamespace(pid int, nstype string) (bool, error)

HasNamespace checks if host namespace and container namespace are different.

func ParentMount

func ParentMount(path string) (string, error)

ParentMount parses mountinfo and return the path of parent mount point for which the provided path is mounted in

func ParseMountInfo

func ParseMountInfo(path string) (map[string][]string, error)

ParseMountInfo parses mountinfo pointing to path and returns a map of parent mount points with associated child mount points

func ReadIDMap

func ReadIDMap(path string) (uint32, uint32, error)

ReadIDMap reads uid_map or gid_map and returns both container ID and host ID

func SetOOMScoreAdj

func SetOOMScoreAdj(pid int, score *int) error

SetOOMScoreAdj sets OOM score for process with pid

Types

This section is empty.

Jump to

Keyboard shortcuts

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