4 ms·
In Linux, if PID 1 ever goes down the kernel panics. You could put a watchdog in your PID 1 that will take it down if the timer isn't tickled for a certain peri
by jschwartzi 11y ago
In Linux, if PID 1 ever goes down the kernel panics. You could put a watchdog in your PID 1 that will take it down if the timer isn't tickled for a certain period of time.
- cnvogel 11y agoEven better, explicitly request a fast reboot: "echo b >/proc/sysrq-trigger".
- andrewaylett 11y agoSystemd has a couple of nice features around this: init can open the hardware watchdog and ping it as required, so if init ever stops then the machine will reboot. At the same time, services can be set up to need to write to their own watchdog. So if a service dies, either init will notice and take appropriate action, or init will also have died and the hardware watchdog will reboot the system. Also -- and this has been useful to me on a laptop -- init will configure the watchdog as a last-resort to kill the system when shutting down.