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

cgroups

package
v1.15.5 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2026 License: Apache-2.0 Imports: 4 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cgroup

type Cgroup struct {
	HierarchyID    string
	ControllerList string
	GroupPath      string
}

Cgroup represents a linux cgroup.

func GetCgroups

func GetCgroups(pid int32, fsys fs.FS) ([]Cgroup, error)

GetCGroups returns a slice of cgroups for pid using fs for filesystem calls.

The expected cgroup format is "hierarchy-ID:controller-list:cgroup-path", and this function will return an error if every cgroup does not meet that format.

For more information, see:

Jump to

Keyboard shortcuts

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