LinuxCommandLibrary

systemd-cgls

Show cgroup hierarchy tree

TLDR

Display the whole control group hierarchy

$ systemd-cgls
copy
Display a control group tree of a specific resource controller
$ systemd-cgls [cpu|memory|io]
copy
Display the control group hierarchy of specific units
$ systemd-cgls -u [unit1] [unit2]
copy

SYNOPSIS

systemd-cgls [options] [cgroup...]

DESCRIPTION

systemd-cgls recursively shows the contents of the Linux control group (cgroup) hierarchy in a tree format. It displays which processes belong to which control groups, organized by systemd slices and services.
The tool is useful for understanding how systemd organizes processes and for debugging resource management issues.

PARAMETERS

-u, --unit _unit_

Show control groups of specified unit(s)
-a, --all
Show all control groups, including empty ones
-l, --full
Don't truncate process names
-k
Include kernel threads
--no-pager
Don't pipe output to a pager
-M, --machine _container_
Show control groups in specified container

CAVEATS

Requires cgroups v2 or v1 to be mounted. The tree structure reflects the systemd unit hierarchy. Empty control groups are hidden by default. Part of the systemd suite.

SEE ALSO

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community