SYSTEMD-CGLS(1)
๐ systemd-cgls โ the control group tree tour, bestie edition ๐
okay so real quick, the manual name is systemd-cgls and it lives in section 1 of the systemd manual. it's the "show me everything inside my cgroups, recursively" girlie. she's giving file-tree energy but for control groups. ๐ธ
โจ NAME โจ
systemd-cgls โ recursively show control group contents ๐ซถ
๐ SYNOPSIS ๐
systemd-cgls [OPTIONS...] [CGROUP...]
systemd-cgls [OPTIONS...] --unit|--user-unit UNIT...
๐ฆ DESCRIPTION ๐ฆ
systemd-cgls walks the selected Linux control group hierarchy recursively and shows you everything inside it, as a tree. no cap, it's just a whole tree of cgroups and the processes chilling in them. ๐ณ
if you pass arguments, it shows all member processes of the specified control groups, plus all their subgroups, plus all the members of those subgroups. like, the entire family tree. ๐
those control groups can be given either:
- by their full file paths, or
- just by name, in which case they're assumed to be in the systemd control group hierarchy.
if you pass no argument at all, here's the vibe check:
- if your current working directory is beneath the control group mount point
/sys/fs/cgroup/, it shows the contents of the control group that your working directory refers to. ๐ - otherwise, it shows the full systemd control group hierarchy. the whole thing. main character energy. ๐
by default, empty control groups are not shown. (they're shy. we respect that. ๐)
๐ OPTIONS ๐
here's everything she understands, bestie:
--allโ do not hide empty control groups in the output. let the empty ones have their moment. โจ-l,--fullโ do not ellipsize process tree members. no...truncation, full names only. ๐ฅ
Added in version 198.
-u,--unitโ show cgroup subtrees for the specified units.
Added in version 233.
--user-unitโ show cgroup subtrees for the specified user units.
Added in version 233.
-kโ include kernel threads in the output. yes, the kernel ones. they're invited too. ๐ง-M MACHINE,--machine=MACHINEโ limit the control groups shown to the part corresponding to the container MACHINE. so you only see that container's slice of the party. ๐ฆ
Added in version 203.
--xattr[=BOOL],-xโ controls whether to include information about extended attributes of the listed control groups in the output. with the long option only, it optionally accepts a boolean value. defaults to no.
Added in version 250.
--cgroup-id[=BOOL],-cโ controls whether to include the numeric ID of the listed control groups in the output. again, with the long option only, it optionally accepts a boolean value. defaults to no.
Added in version 250.
-h,--helpโ print a short help text and exit. the classic. ๐--versionโ print a short version string and exit.--no-pagerโ do not pipe output into a pager. straight to the terminal, no middleman. ๐ซ
๐ EXIT STATUS ๐
on success, 0 is returned. a non-zero failure code otherwise. that's it, that's the whole story. ๐
๐ SEE ALSO ๐
systemd(1), systemctl(1), systemd-cgtop(1), systemd-nspawn(1), ps(1)
and that's the whole page, bestie!! go forth and inspect ur cgroups, u absolute icon ๐
this was brought to u by systemd 262.1 โ mwah, slay, periodt โจ๐
๐ฆ where this page comes from
- arch rolling: systemd 262.1-1 ยท LGPL-2.1-or-later AND CC0-1.0 AND GPL-2.0-or-later AND MIT-0
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms