CGGET(1)
π CGGET(1) β libcgroup manual, but make it a group chat π
okay bestie, pull up a chair because this one is so useful. it's cgget, from the libcgroup manual, and it's basically the "show me what's in there" tool for control groups. no cap.
β¨ NAME β¨
cgget β print parameter(s) of given group(s). that's it, that's the whole job. she reads, she reports, she does not write. an icon who minds her business π
πΈ SYNOPSIS πΈ
cgget [-n] [-v] [-m] [-b] [-r <name>] [-g <controller>] [-a] <path> ...
cgget [-n] [-v] [-m] [-b] [-r <name>] -g <controller>:<path> ...
two whole ways to run her, pick your fighter π«Ά
π¦ DESCRIPTION π¦
so the vibe is: she prints the parameter(s) of the input cgroup(s). simple. clean. iconic.
and here's the cute part β if you don't specify neither controller nor variable, she just shows you the values of all possible variables. maximalist queen behavior, honestly. why choose.
<path>β the name of the cgroup she should read, bestie. and yes, you can pass this parameter multiple times because she's not a one-path kind of girl.
π OPTIONS π
-a,--allβ prints the variables for all controllers which consist in the given cgroup. all of them. she said "give me everything" and she meant it β¨-bβ ignores the default systemd delegated hierarchy path and constructs the path of the control groups relative to the cgroup root hierarchy. lowkey a path-rewrite moment.-cβ displays the controllers and their versions. this option can be used along with-m, they're besties π«Ά-g <controller>β defines controllers whose values should be displayed. this option can be used multiple times, stack 'em up.-g <controller>:<path>β defines control groups whose values should be displayed. also can be used multiple times. same flag, different energy, iykyk.-h,--helpβ display help and exit. the classic escape hatch πͺ-mβ displays the current control groups setup mode. and there are three modes she might report, bestie, so let me lay them out:- legacy β cgroup v1 only
- unified β cgroup v2 only
- hybrid β cgroup v1/v2
the way that's literally a whole personality quiz for your kernel π
-nβ do not print headers, i.e. names of groups. she goes straight to the tea, no intros.-r,--variable <name>β defines the parameter to display. this option can be used multiple times. yes queen, ask for as many as you want.-v,--values-onlyβ print only values, not parameter names. minimalism. clean lines. no notes.
π EXAMPLES π
okay now the fun part, let's actually watch her cook π
ask for specific variables on two groups, headers included:
$ cgget -r cpuset.cpus -r cpuset.mems first second
first:
cpuset.cpus=0-1
cpuset.mems=0
second:
cpuset.cpus=0
cpuset.mems=0
same thing but with -n so she drops the headers and just stacks the output:
$ cgget -n -r cpuset.cpus -r cpuset.mems first second
cpuset.cpus=0-1
cpuset.mems=0
cpuset.cpus=0
cpuset.mems=0
now add -v and it's just the numbers, nothing else, immaculate:
$ cgget -nv -r cpuset.cpus -r cpuset.mems first second
0-1
0
0
0
and here she is grabbing a whole controller's worth of variables off the root:
$ cgget -n -g cpu /
cpu.rt_period_us=1000000
cpu.rt_runtime_us=950000
cpu.shares=1024
and finally, the mode check β one flag, one answer:
$ cgget -m
Unified Mode (Cgroup v2 only).
slay. π₯
π ENVIRONMENT VARIABLES π
CGROUP_LOGLEVELβ controls verbosity of the tool. the allowed values areDEBUG,INFO,WARNINGorERROR. pick your chatter level, babe π§
π SEE ALSO π
go read these next, bestie, they're all part of the lore:
cgrules.conf (1)cgcreate (1)cgget (1)
real talk though: nothing here is dangerous, she's read-only and just tells you things. go wild. π«Ά
okay that's the whole page!! this came from the Linux manual, libcgroup era, dated 2010-01-18, filed under CGGET(1). periodt π β¨
π¦ 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) 2010 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