ubuntu 13.04安装supervisor

来源:互联网 发布:手机通话记录软件大全 编辑:程序博客网 时间:2024/06/04 19:01
supervisor工具用来监控进程,如果出现异常退出就自动重启。
1.sudo apt-get install supervisor
2.修改/etc/supervisor/supervisord.conf
加上以下的项
[inet_http_server]
port=host_ip:9010
这里的host_ip替换成具体的机器内网ip
修改防火墙,开放9010端口
3.增加/etc/supervisor/confi.d/test.conf
[program:test]
directory = /home/hadoop/miniprog/python
command = python test_supervisor.py
user = hadoop
autostart = true
autorestart = true
redirect_stderr = True
4.启动supervisor
sudo /etc/init.d/supervisor start
这样就可以对test_supervisor.py进行监控了。
5.打开http://locahost:9010
就可以看到supervisor的监控页面了。
0 0
原创粉丝点击