Reply to post: Re: I've forgotten...

Systemd adds filesystem mount tool

John Robson Silver badge

Re: I've forgotten...

So what happens if your precious (and now massively complex) systemD crashes, or gets stuck in a loop?

A watchdog can be coded in a handful of lines of your favoured shell script - it is therefore massively unlikely to crash an burn, since there is very little to go wrong.

Paranoia is good though, so I often use cron to run the watchdog every minute (or every 15 depending on the complexity of the process being watched) -it's fractionally slower than a tight looping check, but gives an acceptable level of response for everything except safety/life critical systems - and at far lower performance cost.

Now you ask what happens if cron fails? Not something I've ever seen actually - it's as reliable as init...

It also makes for nice easy reading, and the watchdog can call on mailx if it needs to notify you that something has died and been restarted.

Indeed it can also pop a flag file in a tmp directory and *not* restart the process more than once an hour, or until reset...

Does systemD have the option to 'try this three times, then give up and email, on success reset the counter after an hour'

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon

Biting the hand that feeds IT © 1998–2019