systemd: cpu usage of services

2

I'm running systemd 229-3 on an up-to-date Arch Linux installation. Lightdm is launched on startup, and starts my XFCE desktop environment. Furthermore, laptop-mode-tools is installed and run on startup.

Sometimes, after logging in, I experience huge reaction times on my system, and I already noticed a couple of times, that systemd with high CPU usage is causing them. How can I figure out, what service is the reason of that high CPU usage? I've already tried to disable laptop-mode.service, but to no avail. There must be a way to see what service is causing trouble here, isn't it?

LukeLR

Posted 2016-04-02T22:53:20.307

Reputation: 1 233

Answers

3

If you enabled the cpuacct cgroup subgroup in the kernel. You can try systemd-cgtop to identify which systemd service causes high cpu usage.

Generally top can be used to check the cpu usage by each process.

Shuangistan

Posted 2016-04-02T22:53:20.307

Reputation: 281

Of course I'm using top to monitor my system's activity, but it just shows systemd with a stunning high CPU usage (up to 300%). I'll give systemd-cgtop a try the next time I notice this issue ;) Thanks so far. – LukeLR – 2016-04-05T14:48:33.700