Help us shape the future of Go! Take the 2026 Go Developer Survey

cgroup

package
v3.8.0 Latest Latest
Warning

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

Go to latest
Published: May 1, 2026 License: AGPL-3.0 Imports: 9 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