简体   繁体   English

Monit Python守护进程

[英]Monit python daemon process

How could I check python daemon process? 如何检查python守护进程? I'm trying 我正在努力

check process rane
        matching "147684802"
        start program = "/usr/local/bin/python2.7 /root/rane.py 147684802 > /dev/null 2>&1 &"

But it fails with timeout for my daemon-python case. 但是对于我的daemon-python实例,超时失败。 Thanks! 谢谢!

Monit executes the program directly - not using shell, if the program doesn't daemonize itself, you need to wrap it like this: Monit直接执行程序-不使用shell,如果程序不守护自己,则需要如下包装:

start program = "/bin/bash -c '/usr/local/bin/python2.7 /root/rane.py 147684802 &'" 启动程序=“ / bin / bash -c'/usr/local/bin/python2.7 /root/rane.py 147684802&'”

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM