systemd watchdog for frozen application

Viewed 14

I was checking how the watchdog is implemented in systemd. I saw some examples. In these examples I couldn't see that application sends feedback to systemd, that it is alive.

How systemd will know and restart application if it is frozen? Because in this case, it is not crashed, application is there but frozen. thank you.

1 Answers

systemd only checks if the PID still exists. There is to my knowledge no standard way to implement "custom watchdog checks" to verify if a processes is not stuck on a mutex or so. You can for instance implement your own watchdog as a separate systemd unit, that performs a custom check on the supervised process.

Related