LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

cgclassify

move running processes to a cgroup

TLDR

Move a process to the CPU cgroup "student"
$ cgclassify -g [cpu:student] [1234]
copy
Move a process based on /etc/cgrules.conf
$ cgclassify [1234]
copy
Move to cgroup with sticky mode
$ cgclassify --sticky -g [cpu:/student] [1234]
copy

SYNOPSIS

cgclassify [options] pid...

DESCRIPTION

cgclassify moves running processes to control groups (cgroups). This allows changing resource limits and accounting for already-running processes without restarting them.When used without the -g option, processes are classified according to rules in /etc/cgrules.conf.

PARAMETERS

-g controllers:path

Move process to specified cgroup hierarchy
--sticky
Prevent cgred daemon from reclassifying the process
--cancel-sticky
Allow cgred to manage the process again

CONFIGURATION

/etc/cgrules.conf

Rules for automatic cgroup classification when -g is not specified.
/etc/cgconfig.conf
Cgroup hierarchy and controller configuration.

INSTALL

sudo apt install cgroup-tools
copy
sudo apk add cgroup-tools
copy

CAVEATS

Requires cgroups v1 tools (libcgroup). For cgroups v2, use different tools. Moving processes between cgroups may affect their resource access immediately.

SEE ALSO

cgcreate(1), cgexec(1), cgroups(7)

RESOURCES

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid