4 ms·
sudo systemctl show [servicename].service -p NRestarts any way to do that on all services aside from looping ?
by ilyt 3y ago
sudo systemctl show [servicename].service -p NRestarts
any way to do that on all services aside from looping ?
- kelnos 3y agoI think a better way (as mentioned by the parent) is to use FailureAction to do something (like send an event to an alerting system). Granted, you have to modify all the .service files that you care about, which is annoying.
- gbraad 3y agoYou would be selective. For OS services you should be able to rely on them... You also don't want to deal with all of them. For this you could otherwise just use journalctl. You also have OOM issues, and this has its own facility.