How to use Linux software watchdog?

后端 未结 9 2268
星月不相逢
星月不相逢 2020-12-05 05:02

Can anybody tell me how to handle the software watchdog in Linux?

I have a program SampleApplication which runs continuously and I need to restart it if

9条回答
  •  感动是毒
    2020-12-05 05:43

    Documentation for the watchdog is here: http://linux.die.net/man/8/watchdog

    But it sounds like this is not what you want. The linux software watchdog will reboot the machine, not just restart your process.

    You can easily make your own watchdog. For example, you could have your program periodically write some temp file, and launch a script that checks the file once in a while and restarts your process if it hasn't updated for some time.

提交回复
热议问题