[systemd-devel] Problem understanding output of systemd-cgtop

Michal Koutný mkoutny at suse.com
Mon Aug 10 16:05:45 UTC 2020


Hello.

On Mon, Aug 03, 2020 at 10:31:28AM +0200, Ulrich Windl <Ulrich.Windl at rz.uni-regensburg.de> wrote:
> 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.
systemd-cgls lists (full) hierarchy maintained by systemd for process
tracking.
The available controller hierarchies can be more shallow though as
they're maintained based on configuration needs. And systemd-cgtop shows
information from the controller hierarchies.

> Also, when using "systemd-cgtop --depth 1", I get this output:
> Control Group                            Tasks   %CPU   Memory  Input/s Output/s
> /                                            -    1.1   564.7M        -        -
> /init.scope                                  1      -        -        -        -
> /system.slice                               82      -        -        -        -
> /user.slice                                 18      -        -        -        -
> 
> 
> Does that output mean /init.scope, /system.slice, and /user.slice all
> don't need any CPU and memory, while only / does?
You only see aggregated consumption of everything under the root*.
because apparently no unit specified fine-grained CPU or memory
accounting


> So why does / have CPU and memory usage, while all others don't?
The tasks count under the root is missing since it's not implemented in
v228, the IO may be missing because no IO is taking place at the
moment.

Regards,
Michal

*) That is usage of all units under the root slice + tasks residing in
the root cgroup (typically only kernel threads, these aren't associated
with any unit and their accounting may be special).


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Digital signature
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20200810/8c9520bd/attachment.sig>


More information about the systemd-devel mailing list