CGXSET(1)
π CGXSET(1) β the libcgroup Manual's absolute icon π
okay bestie, gather round, because this one is cgxset and it is the tool for setting the parameters of the cgroup(s) you point at. she's from the libcgroup Manual, she's got the whole translation-girlie thing going on, and fr fr she is so useful. let's get into it π«Ά
β¨ NAME β¨
cgxset β set the parameters of given cgroup(s)
no thoughts, just vibes, just parameter-setting π
πΈ SYNOPSIS πΈ
cgxset [-1] [-2] [-i] [-b] [-R] [-r <name=value>] <cgroup_path> ...
cgxset [-b] [-R] --copy-from <source_cgroup_path> <cgroup_path> ...
two whole forms, both iconic, pick your fighter π
π¦ DESCRIPTION π¦
So basically: cgxset sets the parameters of the input cgroups. That's the whole gig. But here's the serve β when the request's cgroup version is different from the system's cgroup version, cgxset will attempt to translate from one version to the other. yes she speaks both languages, bilingual queen π
Now if the request version and the system's version are the same, no translation happens at all, and cgxset will behave like cgset. literally just cgset wearing a different outfit. π
β οΈ serious business warning bestie: if no version is specified by the user (either[-1]or[-2]) and the[-r]flag is specified, the behavior is undefined. undefined. we do not know what she will do. do not test her. π
Also β --copy-from does not require the cgroup version to be specified. she came prepared, no translation drama needed π
<path> is the name of the cgroup which should be changed. This parameter can be used multiple times. stack 'em up, bestie β¨
the options, one by one, we love her π
-1,--v1β data in/out ofcgxsetis in cgroup v1 format. In this mode, you the user will provide values in cgroup v1 format, and you receive values in v1 format. format. (yes, "format." twice, she said it twice, that's how committed she is π ) If the system is running in cgroup v2 mode, libcgroup will convert the data as necessary.-2,--v2β data in/out ofcgxsetis in cgroup v2 format. In this mode, you the user will provide values in cgroup v2 format, and you receive values in v2 format. If the system is running in cgroup v1 mode, libcgroup will convert the data as necessary. the mirror twin, the v2 sister π§-bβ ignores the default systemd delegated hierarchy path and constructs the path of the control groups relative to the cgroup root hierarchy. she said "not that path, this path", and honestly? valid.-i,--ignore-unmappableβ ignore errors for values that cannot be converted from v1 to v2 or vice versa. some things just don't translate, and that's fine, we move on π-r <name=value>β defines the name of the file to set and the value which should be written to that file. This parameter can be used multiple times. say it with me: mul-ti-ple times. go off π-Rβ recursively sets variable settings passed with-roption tocgroup_pathand its descendant cgroups. her children. her children's children. all of them. the whole bloodline gets the update π--copy-from <source_cgroup_path>β defines the name of the cgroup whose parameters will be copied to the input cgroup. copy/paste but make it cgroups, obsessed π
π ENVIRONMENT VARIABLES π
CGROUP_LOGLEVELβ controls verbosity of the tool. Allowed values areDEBUG,INFO,WARNINGorERROR. pick your volume level bestie βDEBUGis the yapper,ERRORis the strong silent type π
π₯ EXAMPLES π₯
the receipts, the proof, the slay:
cgxset -1 -r cpuset.cpus=0-1 student
set variable cpus in control group student (controller cpuset) to 0-1 β v1 mode, locked in β¨
cgxset -2 -r cpu.weight=42 first
set variable weight in control group first (controller cpu) to 42 β v2 mode, and yes 42, the answer, the girlboss number π
cgxset --copy-from group1/ group2/
copy all parameters of group group group1 to group group group2 (for all path where both cgroups are defined) β wholesale duplication, no notes π
β SEE ALSO β
go read her friends too, they're all serving:
cgrules.conf(1)cgcreate(1)cgget(1)cgset(1)cgxget(1)
okay that's the whole page bestie, you're officially cgroup-pilled π§ that's the Linux 2022-08-03 CGXSET(1) moment, straight out of the libcgroup Manual β date and all, no cap. now go set some parameters and have the best day. mwah ππ«Άπ
π¦ where this page comes from
- alpine 3.24: libcgroup-doc 3.2.0-r0 Β· LGPL-2.1-only
- nixos 26.05: libcgroup 3.2.0
- nixpkgs unstable: libcgroup 3.2.0
- ubuntu stonking: cgroup-tools 3.2.0-1 Β· LGPL-2.1-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms