[systemd-devel] Problem understanding output of systemd-cgtop
Lennart Poettering
lennart at poettering.net
Mon Aug 10 18:01:51 UTC 2020
On Mo, 03.08.20 10:31, Ulrich Windl (Ulrich.Windl at rz.uni-regensburg.de) wrote:
> Hi!
>
> While examining a scheduling problem that might have resulted from restrictions imposed by cgroups, I examined my machine using systemd-cgtop and systemd-cgls (systemd-228-157.12.5.x86_64 of SLES12).
> Among the things I don't understand are:
> Why is systemd-cgtop outputting much less slices than systemd-cgls does? Specifically I don't see the slice for the process I'm examining ("system-iotwatch.slice"). systemd-cgls shows it with three services.
You need to enable resource accounting for data to be shown for a
unit. Either per unit with MemoryAccounting=, CPUAccounting=,
IOAccounting= and so on, see systemd.resource-control(5). Or globally
with DefaultMemoryAccounting=, … in systemd-system.conf.
By default the accounting is not enabled on old kernels since it's
slow there. On newer kernels we enable some accounting by default, but
not all.
For the root cgroup we can use the system resource accounting, which
is available always, hence you always see useful data for the first
line, regardless if per-unit accounting is on or not.
Lennart
--
Lennart Poettering, Berlin
More information about the systemd-devel
mailing list