cgroup

package
v0.0.0-...-ccefb74 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package cgroup implements parsing for all the cgroup categories and functionality in a simple way.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetMemoryLimit

func GetMemoryLimit(pid int) (limit uint64, err error)

GetMemoryLimit - Fetches cgroup memory limit either from a file path at '/sys/fs/cgroup/memory', if path fails then fallback to querying cgroup manager.

Types

type CGEntries

type CGEntries map[string]string

CGEntries - represents all the entries in a process cgroup file at /proc/<pid>/cgroup as key value pairs.

func GetEntries

func GetEntries(pid int) (CGEntries, error)

GetEntries reads and parses all the cgroup entries for a given process.

Jump to

Keyboard shortcuts

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