How to use Linux software watchdog?

后端 未结 9 2260
星月不相逢
星月不相逢 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:56

    Most of the Unix/Linux init programs will manage daemons for you and restart them. Look into placing your service in /etc/inittab. Or you might be using Upstart or systemd.

    All of these programs run as PID 1 and it is their job to monitor and restart system processes.

    From your Busybox tag I would assume you are running an embedded system. On those, the System V style init scripts with all of their shell scripts are really overkill. You should probably rip all that out and replace it with entries in /etc/inittab or upstart or systemd jobs.

提交回复
热议问题