您的位置:首页 > 运维架构 > Linux

Watchdog on Linux

2012-10-14 10:39 204 查看
On Linux, if we would like to restart our process when it is down without expect, we can achieve this goal by

1) As a service, can be used as 'service start/stop program' etc

Write a script which starts/stops the program and place them under /etc/init.d/ and create corresponding symbolic link under rc{1-5}.d to the script.

2) Configure the /etc/inittab which can restart the program if it dies

Example:

Append the following line to /etc/inittab and then issue 'telinit q' to tell init process to reload the changes.

lm:5:respawn:/usr/local/sbin/LSI_master

Reference:

man 8 init/inittab
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: