Restarting systemd services on sustained CPU abuse

16 points by gerikson


tomsmeding

Sustained abuse (>5%) triggers restart Pegged at quota (90% of 10%) triggers immediate restart

90% of 10% (i.e. 9%) is greater than 5%, so the second condition is subsumed by the first. This can also be seen in the script, although the conditions are reversed there; the result is that only log messages differ between the two situations — the same actions are performed.

This can probably be simplified a little :)