CGCLASSIFY(1)
π CGCLASSIFY β the libcgroup girlie's guide
okay bestie, welcome to cgclassify, a page straight out of the libcgroup Manual. she's the girl who picks up your already-running processes and yeets them into whatever cgroups you tell her to. no restart, no drama, just relocation. π
β¨ SYNOPSIS β¨
cgclassify [-b] [-g <controllers>:<path>] [--sticky | --cancel-sticky]
<pidlist>
π DESCRIPTION π
so like, this command moves processes β the ones you list out in pidlist β into the control groups you specify. that's it, that's the whole job. π«Ά
the pids in the pidlist are separated by spaces. just spaces. nothing fancy, no commas, no vibes-based delimiters.
-bβ this one ignores the default systemd delegated hierarchy path and constructs the path of the control groups relative to the cgroup root hierarchy instead. like, forget the delegated route, we're going from the root, periodt.-g<controllers>:<path>β this defines the control groups where the task will get moved to. controllers is a list of controllers and path is the relative path to control groups in the given controllers list.
you can use this flag multiple times to define multiple pairs of lists of controllers and relative paths. iconique, honestly. and instead of listing all the mounted controllers one by one, you can just use the wildcard *. yes, the star. she's that girl. β
if you don't use this option at all, then cgclassify will automatically move the task to a control group based on /etc/cgrules.conf. so it's not like you're stranded, she's got a default plan for you.
-rβ Replaces systemd scope's idle process with the first process of the list of process (pidlist). the first one. the main character of your pid list. π--stickyβ if you use this, the daemon of servicecgred(thecgrulesengdprocess) does not change both the specified pidlist and their children tasks. like, it leaves the whole family alone. without this option, the daemon does not change the specified pidlist but it automatically changes their child tasks to the right cgroup based on/etc/cgrules.conf. so default behaviour = the kids get reassigned, the parents don't. π§--cancel-stickyβ if you use this one, the daemon of servicecgred(thecgrulesengdprocess) can automatically change both the specified pidlist and their child tasks to the right cgroup based on/etc/cgrules.conf. everybody's getting moved, no exceptions, no cap. π
π ENVIRONMENT VARIABLES π
CGROUP_LOGLEVELβ controls verbosity of the tool. Allowed values areDEBUG,INFO,WARNINGorERROR. so pick your noise level, babe.
πΈ FILES πΈ
/etc/cgrules.confβ default libcgroup configuration file/etc/cgrules.dβ default libcgroup configuration files directory
π¦ EXAMPLES π¦
cgclassify -g cpu:student 1234β moves process with pid number 1234 to control group student in cpu hierarchy. β¨cgclassify 1234β moves process with pid number 1234 to control groups based on/etc/cgrules.confconfiguration file. the default route, no thoughts head empty, she handles it.cgclassify --sticky -g cpu:/student 1234β moves process with pid number 1234 to control group student in cpu hierarchy. The daemon of service cgred does not change cgroups of pid 1234 and its children (based on/etc/cgrules.conf). sticky mode: nobody gets moved after, not even the kids. π«Ά
π SEE ALSO π
cgrules.conf (5), cgexec (1)
okay that's the whole page, you ate, go move some processes. π
libcgroup Manual Β· Linux Β· 2009-03-15 Β· this is the CGCLASSIFY(1) era and we're living in it. mwah. π
π¦ where this page comes from
- debian trixie: cgroup-tools 3.1.0-2+b2 Β· LGPL-2.1-only
- ubuntu questing: cgroup-tools 3.1.0-2
- ubuntu resolute: cgroup-tools 3.1.0-2build1 Β· LGPL-2.1-only
- ubuntu stonking: cgroup-tools 3.2.0-1 Β· LGPL-2.1-only
- Copyright (C) 2009 Red Hat, Inc. All Rights Reserved
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms