supervisor挺好用的

on May 30th, 2010 by 小桥 | No Comments »

supervisor是一个用Python写的程序,运行在UNIX-like操作系统,可以用来监控和管理多个进程。
在CentOS下,直接运行“yum install supervisor”即可完成安装,只是CentOS5带的supervisor版本比较老。。。
supervisor的配置文件是/etc/supervisord.conf,如果是用easy_install安装的话,可以用“echo_supervisord_conf > /etc/supervisord.conf”生成一个默认配置文件。配置文件里面的参数很容易看懂,主要修改[program:theprogramname]节的内容即可,需要设置正确的command和user参数。
对进程的控制是使用supervisorctl命令,比如:

supervisorctl stop web
supervisorctl start web

Leave a Reply

Your email address will not be published. Required fields are marked *

CAPTCHA * Time limit is exhausted. Please reload the CAPTCHA.