我想知道是否有可能在停止/启动方法之间添加延迟。 这主要是因为它需要至less10秒的延迟才能closures所有打开的套接字连接,并优雅地closures服务器套接字以重新启动。
这是我的monit脚本
set logfile /var/log/monit.log check process test.sh with pidfile /home/svcs/test/pid/app.pid start program = "/etc/init.d/test.sh start" with timeout 60 seconds stop program = "/etc/init.d/test.sh stop" with timeout 60 seconds if failed host xx.xx.com port 443 type tcpSSL protocol http with timeout 15 seconds retry 3 then restart alert [email protected]
谢谢
命令是
sleep
之后是一个以秒为单位的值。
所以在线之间joinsleep 10 ,应该这样做。
请注意,它必须是solaris上的整数值; 在一般的linux小数工作(你可以把10.15或别的东西)。