前端之家收集整理的这篇文章主要介绍了
linux – 将monit用于不作为守护进程后台/运行的进程,
前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我正在使用montit来运行我需要运行的其他进程,但我有一个不作为守护进程运行的进程,我无法弄清楚如何用monit监视它
当前版本的monit允许您使用匹配的“string”指令而不是PID来匹配进程字符串…
@H_
404_6@check process n2n-edge
matching "/usr/sbin/edge"
start program = "/root/tools/edge.87.server"
stop program = "/usr/bin/killall edge"
if 10 restarts within 11 cycles then timeout
if
cpu usage > 95% for 11 cycles then restart