我正在configuration一些服务在Ubuntu服务器上运行。
我正在浏览下面的链接,他们使用runit来运行服务和monit监视服务 –
http://rubyworks.rubyforge.org/manual/monit.html http://rubyworks.rubyforge.org/manual/runit.html
1)服务都是从monit开始的。 2)Monit inturn使用runit启动它们。
使用上述设置的优点是,使用Monit通过runit运行服务。 为什么在中间使用runit,而不是直接用monit来启动它们?
runit更适合运行进程,因为它不依赖于pid文件,并且在subprocess崩溃时也会重启。
Monit监视这些进程的性能,并根据需要使用runit重新启动它们。
Monit轮询进程,而runit将它们作为subprocess运行。 我的猜测是,添加runit到监控设置有能力增加您的服务的正常运行时间百分比。