cgroups
Linux kernel resource control and isolation
TLDR
This page is an index — see cgcreate for creating control groups
$ cgcreate -g [controllers]:[path]
Run a process in a cgroup with cgexec$ cgexec -g [controllers]:[path] [command]
Move a running process with cgclassify$ cgclassify -g [controllers]:[path] [pid]
DESCRIPTION
cgroups (control groups) is a Linux kernel feature for limiting, measuring, and controlling resource usage by processes. It is not a single command but a collection of tools and kernel interfaces.Cgroups can limit CPU, memory, I/O, and network resources. They are fundamental to container technologies like Docker and systemd resource management.
RELATED COMMANDS
cgclassify
Move running processes to a cgroupcgcreate
Create new cgroupscgexec
Run a command in a cgroupcgget
Get cgroup parameterscgset
Set cgroup parameterscgdelete
Remove cgroups
CAVEATS
Linux has two versions of cgroups (v1 and v2) with different interfaces. Modern systems often use cgroups v2 unified hierarchy. The libcgroup tools work with v1; systemd manages v2 natively.
SEE ALSO
cgclassify(1), cgcreate(1), cgexec(1), systemd-cgtop(1)