cgroup

package
v3.11.0 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2026 License: AGPL-3.0 Imports: 9 Imported by: 3 modules, 3 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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