# cave resolve monit -x
# systemctl enable monit.service
# systemctl restart monit.service
On a Plasma X11 session kglobalaccel
is going rogue under certain circumstances consuming 100% CPU and needs to be restarted when that happens: https://bugs.kde.org/show_bug.cgi?id=306352
Since this is a systemd user service it needs some additional parameters
# nano -w /etc/monit.d/kglobalaccel5
check process kglobalaccel5
matching "kglobalaccel5"
start program = "/usr/host/bin/systemctl --machine user@.host --user start plasma-kglobalaccel.service"
stop program = "/usr/host/bin/systemctl --machine user@.host --user stop plasma-kglobalaccel.service"
restart program = "/usr/host/bin/systemctl --machine user@.host --user restart plasma-kglobalaccel.service"
if cpu usage > 10% for 2 cycles then restart
# nano -w /etc/monit.d/kglobalacceld
check process kglobalacceld
matching "kglobalacceld"
start program = "/usr/host/bin/systemctl --machine user@.host --user start plasma-kglobalaccel.service"
stop program = "/usr/host/bin/systemctl --machine user@.host --user stop plasma-kglobalaccel.service"
restart program = "/usr/host/bin/systemctl --machine user@.host --user restart plasma-kglobalaccel.service"
if cpu usage > 10% for 2 cycles then restart