我正在尝试使用god监控工具监控memcached。这是我的memcached.god文件:
God.watch do |w|
w.name = "memcached"
w.interval = 30.seconds # default
w.start = "/etc/init.d/memcached start"
w.stop = "killall memcached"
w.restart = "/etc/init.d/memcached restart && sleep 1"
w.start_grace = 10.seconds
w.restart_grace = 10.seconds
w.pid_file = "/var/run/memcached.pid"
w.uid = "memcache"
# clean pid files before start if necessary
w.behavior(:clean_pid_file)
w.start_if do |start|
start.condition(:process_running) do |c| # check if process is running
c.interval = 5.minute
c.running = false
end
end
end
god加载-c/path/to/memcached.god没有给出任何错误。但当我运行神状态时,我看不到memcached,而且神日志memcached会重新运行
Please wait...
No such watch
我确信上帝的监控正在运行,因为它对apache2运行良好。知道为什么我会有这个问题吗。
您现在可能已经解决了这个问题,但为了将来参考,下面是运行它的方法:
god -c /path/to/memcached.god
我认为您不想要-c。尝试:
god load /path/to/memcached.god
至少,帮助是这么说的。。。