设为首页 加入收藏

TOP

配置supervisor管理beego应用(二)
2018-10-28 00:10:20 】 浏览:307
Tags:配置 supervisor 管理 beego 应用
le_backups=10 ; stderr_logfile=/home/www/go/wx-prj.stderr.log ;打印标准错误输出日志 stderr_logfile_maxbytes=20MB ; stderr_logfile_backups=10 ; log_stdout=true ; if true, log program stdout (default true) log_stderr=true ; if true, log program stderr (def false)

四、启动supervisor服务

supervisord -c /etc/supervisord.conf
启动服务时可以跟踪日志输出观察
[root@10-23-67-69 go]# tail -f  /var/log/supervisor/supervisord.log
2018-10-26 13:36:30,881 INFO Included extra file "/etc/./supervisor/conf.d/wx-prj.ini" during parsing
2018-10-26 13:36:30,902 INFO RPC interface 'supervisor' initialized
2018-10-26 13:36:30,902 CRIT Server 'inet_http_server' running without any HTTP authentication checking
2018-10-26 13:36:31,203 INFO RPC interface 'supervisor' initialized
2018-10-26 13:36:31,203 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2018-10-26 13:36:31,206 INFO daemonizing the supervisord process
2018-10-26 13:36:31,207 INFO supervisord started with pid 17040
2018-10-26 13:36:32,209 INFO spawned: 'hello' with pid 17041
2018-10-26 13:36:32,213 INFO spawned: 'wx-prj' with pid 17042
2018-10-26 13:36:32,219 INFO spawned: 'world' with pid 17043
2018-10-26 13:36:33,279 INFO success: hello entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2018-10-26 13:36:33,279 INFO success: wx-prj entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2018-10-26 13:36:33,279 INFO success: world entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
也通过命令查看程序状态
[root@10-23-67-69 conf.d]# supervisorctl status
hello                            RUNNING   pid 17041, uptime 0:00:19
world                            RUNNING   pid 17043, uptime 0:00:19
wx-prj                           RUNNING   pid 17042, uptime 0:00:19

五、重载supervisor修改过的配置

supervisorctl reload

六、停止/启动/重启supervisor管理的程序

[root@10-23-67-69 conf.d]# supervisorctl stop wx-prj
wx-prj: stopped
[root@10-23-67-69 conf.d]# supervisorctl start wx-prj
wx-prj: started
[root@10-23-67-69 conf.d]# supervisorctl restart wx-prj
wx-prj: stopped
wx-prj: started
[root@10-23-67-69 conf.d]# supervisorctl stop all
hello: stopped
wx-prj: stopped
world: stopped
[root@10-23-67-69 conf.d]# supervisorctl start all
hello: started
wx-prj: started
world: started
首页 上一页 1 2 下一页 尾页 2/2/2
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
上一篇go语言几个最快最好运用最广的web.. 下一篇Go基础系列:数据类型转换(strcon..

最新文章

热门文章

Hot 文章

Python

C 语言

C++基础

大数据基础

linux编程基础

C/C++面试题目