开发者

automatically restart an application after a core dump

I have a linux process but I am taking some core dumps some times.

Simple question: Is there any way/method/program/whatever that is capable of restarting 开发者_运维知识库a process that got killed?

Thanks.


You could wrap the execution of the process in a shell script that would simply keep restarting the app as it exits.


You can use monit.


In addition to what Soo mentioned, ensure you have a reliable notification mechanism so that you know you're getting frequent restarts.

Consider having a restart counter and stop restarting if you restart either too frequently or too many times. If you're just crashing, restarting and instantly crashing again that's usually a pretty bad thing.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜