CGXGET(1)
β¨ NAME β¨
cgxget β print parameter(s) of given group(s) π
πΈ SYNOPSIS πΈ
cgxget [-1] [-2] [-i] [-n] [-v] [-b] [-r <name>] [-g <controller>] [-a]
<path> ...
cgxget [-1] [-2] [-i] [-n] [-v] [-b] [-r <name>] -g <controller>:<path>
...
π¦ DESCRIPTION π¦
Okay bestie, listen. cgxget prints the parameter(s) of whatever input cgroup(s) you hand it. That's the whole vibe. β¨
Here's the tea: if you specify neither a controller nor a variable, it just shows you the values of all possible variables β like, everything, no cap.
And when the request's cgroup version doesn't match the system's cgroup version, cgxget will attempt to translate from one version to the other. π§ When the request version and the system's version are the same? No translation happens at all, and cgxget just behaves like cgget. Simple.
β οΈ But if you don't tell it which version you want β like, no[-1]and no[-2]β the behavior is undefined. Not cute. Don't do that. π
<path>β this is the name of the cgroup that should be read. And yes, you can use this parameter multiple times. Go off. π
π The Options (the main characters)
-1,--v1β data in/out ofcgxgetis in cgroup v1 format. In this mode, you provide values in cgroup v1 format and you receive values in v1 format. If the system is running in cgroup v2 mode,libcgroupwill convert the data as necessary. π«Ά-2,--v2β data in/out ofcgxgetis in cgroup v2 format. In this mode, you provide values in cgroup v2 format and you receive values in v2 format. If the system is running in cgroup v1 mode,libcgroupwill convert the data as necessary. π«Ά-a,--allβ print the variables for all controllers which consist in the given cgroup. All of them. Every last one. π₯-bβ ignores the defaultsystemddelegated hierarchy path and constructs the path of the control groups relative to the cgroup root hierarchy. (lowkey a whole different route, iykyk)-g <controller>β defines controllers whose values should be displayed. This option can be used multiple times. π-g <controller>:<path>β defines control groups whose values should be displayed. This option can also be used multiple times. π-h,--helpβ display help and exit. The classic. π-i,--ignore-unmappableβ ignore errors for values that cannot be converted from v1 to v2 or vice versa. Basically it's giving "we don't see it, it's not there." π-nβ do not print headers, i.e. names of groups. Just the raw goods. β¨-r,--variable <name>β defines the parameter to display. This option can be used multiple times. Stack 'em. π-v,--values-onlyβ print only values, not parameter names. Minimalist era. πΈ
π EXAMPLES π
Not me showing you exactly how it goes. Watch this. π
$ cgxget -1 -r cpuset.cpus -r cpuset.mems first second
first:
cpuset.cpus=0-1
cpuset.mems=0
second:
cpuset.cpus=0
cpuset.mems=0
Now with -n so the headers dip out:
$ cgxget -1 -n -r cpuset.cpus -r cpuset.mems first second
cpuset.cpus=0-1
cpuset.mems=0
cpuset.cpus=0
cpuset.mems=0
And -nv because we're only here for the values, periodt:
$ cgxget -1 -nv -r cpuset.cpus -r cpuset.mems first second
0-1
0
0
0
Grabbing a whole controller at the root:
$ cgxget -1 -n -g cpu /
cpu.rt_period_us=1000000
cpu.rt_runtime_us=950000
cpu.shares=1024
And one in v2 flavor, because we contain multitudes:
$ cgxget -2 -r cpu.max first
first:
cpu.max: max 100000
π ENVIRONMENT VARIABLES π
CGROUP_LOGLEVELβ controls the verbosity of the tool. Allowed values areDEBUG,INFO,WARNINGorERROR. So if you want the full play-by-play, you know where to set it. π’
π AUTHOR π
Tom Hromatka <tom.hromatka@oracle.com>
π SEE ALSO π
cgrules.conf (1), cgcreate (1), cgget (1), cgset (1), cgxset (1)
okay that's the whole page, bestie β you ate π β¨
This one came from the libcgroup Manual and it's serving Linux, dated 2022-08-03, filed under CGXGET(1). Obsessed. ππ¦
π¦ where this page comes from
- alpine 3.24: libcgroup-doc 3.2.0-r0 Β· LGPL-2.1-only
- debian trixie: cgroup-tools 3.1.0-2+b2 Β· LGPL-2.1-only
- nixos 26.05: libcgroup 3.2.0
- nixpkgs unstable: libcgroup 3.2.0
- 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
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms