我正在尝试使用上帝监控工具来监控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上帝加载-c /path/to/memcached.上帝不会给出任何错误。但是当我运行上帝状态时,我看不到memcached,也看不到上帝日志memcached retruns
Please wait...
No such watch我确信上帝监控正在运行,因为它在apache2上运行得很好。你知道为什么我会有这个问题吗?
发布于 2011-07-07 16:00:55
你现在可能已经弄明白了,但为了将来参考,下面是如何运行它的:
god -c /path/to/memcached.god发布于 2011-06-16 06:54:33
我不认为你想要-c。尝试:
god load /path/to/memcached.god至少,助手是这么说的..。
https://stackoverflow.com/questions/6133007
复制相似问题