naraesk / plasma-systemd

Simple plasma widget for controlling systemd services
GNU General Public License v3.0
18 stars 7 forks source link

Logfile spammed and CPU increase when adding a system service #9

Open ioogithub opened 4 years ago

ioogithub commented 4 years ago

Thanks for the nice plugin. I have an issue with adding a system service.

I am able to add the service, and I can confirm that the app works correctly turning it on and off however after adding a service my log is spammed with this message:

Oct 14 13:35:50 computer sudo[28437]: user: TTY=unknown ; PWD=/home/oem ; USER=root ; COMMAND=/bin/systemctl is-active Oct 14 13:35:50 computer sudo[28437]: pam_unix(sudo:session): session opened for user root by (uid=0) Oct 14 13:35:50 computer sudo[28437]: pam_unix(sudo:session): session closed for user root

I get 25 messages every second. Also systemd starts to take up a non trivial amount of CPU.

Is it the widget that is calling the COMMAND=/bin/systemctl is-active this often and is this necessary?

Note, I only see this behavior when adding a system service. If I add a user service, I do not see any instances of COMMAND=/bin/systemctl is-active, there is no CPU increase and it works as expected.

vauvenal5 commented 10 months ago

I guess this is due to missing sudo rights, see readme. But the follow up question is what needs to be done for the widget to just open the std KDE password dialog?