How to use Linux software watchdog?

后端 未结 9 2256
星月不相逢
星月不相逢 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 06:01

    Use /etc/inittab you can utilize it to start in the specific run levels and if it is killed it shall be restarted automatically

    n:2345:respawn:/path/to/app
    

    This will make it respawn in run levels 2345 you probably only need 3 and 5 but this will work fine and is built into Linux.

提交回复
热议问题