supervisor 配置相关项

pypi上下载的supervisor 主要配置项

; Sample supervisor config file.
;
; For more information on the config file, please see:
; http://supervisord.org/configuration.html
;
; Notes:
;  - Shell expansion ("~" or "$HOME") is not supported.  Environment
;    variables can be expanded using this syntax: "%(ENV_HOME)s".
;  - Comments must have a leading space: "a=b ;comment" not "a=b;comment".

[unix_http_server]
file=/tmp/supervisor.sock   ; (the path to the socket file)
;chmod=0700                 ; socket file mode (default 0700)
;chown=nobody:nogroup       ; socket file uid:gid owner
;username=user              ; (default is no username (open server))
;password=123               ; (default is no password (open server))

[inet_http_server]         ; inet (TCP) server disabled by default
port=127.0.0.1:9001        ; (ip_address:port specifier, *:port for all iface)
username=mayiCode          ; (default is no username (open server))
password=yumingfei         ; (default is no password (open server))

[supervisord]
logfile=/tmp/supervisord.log ; (main log file;default $CWD/supervisord.log)
logfile_maxbytes=50MB        ; (max main logfile bytes b4 rotation;default 50MB)
logfile_backups=10           ; (num of main logfile rotation backups;default 10)
loglevel=info                ; (log level;default info; others: debug,warn,trace)
pidfile=/tmp/supervisord.pid ; (supervisord pidfile;default supervisord.pid)
nodaemon=false               ; (start in foreground if true;default false)
minfds=1024                  ; (min. avail startup file descriptors;default 1024)
minprocs=200                 ; (min. avail process descriptors;default 200)
;umask=022                   ; (process file creation umask;default 022)
;user=chrism                 ; (default is current user, required if root)
;identifier=supervisor       ; (supervisord identifier, default is ‘supervisor‘)
;directory=/tmp              ; (default is not to cd during start)
;nocleanup=true              ; (don‘t clean up tempfiles at start;default false)
;childlogdir=/tmp            ; (‘AUTO‘ child log dir, default $TEMP)
;environment=KEY="value"     ; (key value pairs to add to environment)
;strip_ansi=false            ; (strip ansi escape codes in logs; def. false)

; the below section must remain in the config file for RPC
; (supervisorctl/web interface) to work, additional interfaces may be
; added by defining them in separate rpcinterface: sections
[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface

[supervisorctl]
serverurl=unix:///tmp/supervisor.sock ; use a unix:// URL  for a unix socket
;serverurl=http://127.0.0.1:9001 ; use an http:// url to specify an inet socket
;username=chris              ; should be same as http_username if set
;password=123                ; should be same as http_password if set
;prompt=mysupervisor         ; cmd line prompt (default "supervisor")
;history_file=~/.sc_history  ; use readline history if available

; The below sample program section shows all possible program subsection values,
; create one or more ‘real‘ program: sections to be able to control them under
; supervisor.

;[program:theprogramname]
;command=/bin/cat              ; the program (relative uses PATH, can take args)
;process_name=%(program_name)s ; process_name expr (default %(program_name)s)
;numprocs=1                    ; number of processes copies to start (def 1)
;directory=/tmp                ; directory to cwd to before exec (def no cwd)
;umask=022                     ; umask for process (default None)
;priority=999                  ; the relative start priority (default 999)
;autostart=true                ; start at supervisord start (default: true)
;autorestart=unexpected        ; whether/when to restart (default: unexpected)
;startsecs=1                   ; number of secs prog must stay running (def. 1)
;startretries=3                ; max # of serial start failures (default 3)
;exitcodes=0,2                 ; ‘expected‘ exit codes for process (default 0,2)
;stopsignal=QUIT               ; signal used to kill process (default TERM)
;stopwaitsecs=10               ; max num secs to wait b4 SIGKILL (default 10)
;stopasgroup=false             ; send stop signal to the UNIX process group (default false)
;killasgroup=false             ; SIGKILL the UNIX process group (def false)
;user=chrism                   ; setuid to this UNIX account to run the program
;redirect_stderr=true          ; redirect proc stderr to stdout (default false)
;stdout_logfile=/a/path        ; stdout log path, NONE for none; default AUTO
;stdout_logfile_maxbytes=1MB   ; max # logfile bytes b4 rotation (default 50MB)
;stdout_logfile_backups=10     ; # of stdout logfile backups (default 10)
;stdout_capture_maxbytes=1MB   ; number of bytes in ‘capturemode‘ (default 0)
;stdout_events_enabled=false   ; emit events on stdout writes (default false)
;stderr_logfile=/a/path        ; stderr log path, NONE for none; default AUTO
;stderr_logfile_maxbytes=1MB   ; max # logfile bytes b4 rotation (default 50MB)
;stderr_logfile_backups=10     ; # of stderr logfile backups (default 10)
;stderr_capture_maxbytes=1MB   ; number of bytes in ‘capturemode‘ (default 0)
;stderr_events_enabled=false   ; emit events on stderr writes (default false)
;environment=A="1",B="2"       ; process environment additions (def no adds)
;serverurl=AUTO                ; override serverurl computation (childutils)

; The below sample eventlistener section shows all possible
; eventlistener subsection values, create one or more ‘real‘
; eventlistener: sections to be able to handle event notifications
; sent by supervisor.

;[eventlistener:theeventlistenername]
;command=/bin/eventlistener    ; the program (relative uses PATH, can take args)
;process_name=%(program_name)s ; process_name expr (default %(program_name)s)
;numprocs=1                    ; number of processes copies to start (def 1)
;events=EVENT                  ; event notif. types to subscribe to (req‘d)
;buffer_size=10                ; event buffer queue size (default 10)
;directory=/tmp                ; directory to cwd to before exec (def no cwd)
;umask=022                     ; umask for process (default None)
;priority=-1                   ; the relative start priority (default -1)
;autostart=true                ; start at supervisord start (default: true)
;autorestart=unexpected        ; whether/when to restart (default: unexpected)
;startsecs=1                   ; number of secs prog must stay running (def. 1)
;startretries=3                ; max # of serial start failures (default 3)
;exitcodes=0,2                 ; ‘expected‘ exit codes for process (default 0,2)
;stopsignal=QUIT               ; signal used to kill process (default TERM)
;stopwaitsecs=10               ; max num secs to wait b4 SIGKILL (default 10)
;stopasgroup=false             ; send stop signal to the UNIX process group (default false)
;killasgroup=false             ; SIGKILL the UNIX process group (def false)
;user=chrism                   ; setuid to this UNIX account to run the program
;redirect_stderr=true          ; redirect proc stderr to stdout (default false)
;stdout_logfile=/a/path        ; stdout log path, NONE for none; default AUTO
;stdout_logfile_maxbytes=1MB   ; max # logfile bytes b4 rotation (default 50MB)
;stdout_logfile_backups=10     ; # of stdout logfile backups (default 10)
;stdout_events_enabled=false   ; emit events on stdout writes (default false)
;stderr_logfile=/a/path        ; stderr log path, NONE for none; default AUTO
;stderr_logfile_maxbytes=1MB   ; max # logfile bytes b4 rotation (default 50MB)
;stderr_logfile_backups        ; # of stderr logfile backups (default 10)
;stderr_events_enabled=false   ; emit events on stderr writes (default false)
;environment=A="1",B="2"       ; process environment additions
;serverurl=AUTO                ; override serverurl computation (childutils)

; The below sample group section shows all possible group values,
; create one or more ‘real‘ group: sections to create "heterogeneous"
; process groups.

;[group:thegroupname]
;programs=progname1,progname2  ; each refers to ‘x‘ in [program:x] definitions
;priority=999                  ; the relative start priority (default 999)

; The [include] section can just contain the "files" setting.  This
; setting can list multiple files (separated by whitespace or
; newlines).  It can also contain wildcards.  The filenames are
; interpreted as relative to this file.  Included files *cannot*
; include files themselves.

;[include]
;files = relative/directory/*.ini

[program:mayi]
command = python /home/mayiCode/python/test.py
autostart=true
autorestart=true
startsecs=3
stdout_logfile=/home/mayiCode/test.log

启动的时候会出现 Another program is already listening on a port that one of our HTTP servers is configured to use. Shut this program down first before starting supervisord.

sudo unlink /**/supervisor.sock

查找文件方法 find -name supervisor.sock

启动 sudo supervisord

命令行 sudo supervisorctl status mayi

supervisroctl 也可以直接用这个命令进入命令行输入 status/stop/start program的状态、停止、启动

停止supervisord 用命令ps aux 可以看到当前 运行在内存中的进程 看到进程号  sudo kill 进程号   关闭即可

时间: 2024-10-10 03:05:33

supervisor 配置相关项的相关文章

Supervisor 配置过程

Supervisor 配置过程 (转自https://www.izixia.cn/2016/01/03/supervisor-pei-zhi-guo-cheng/) 1.安装 pip install supervisor 安装后测试是否成功echo_supervisord_conf 2.建立配置文件 创建目录 mkdir -m 755 -p /etc/supervisor/ mkdir -m 755 conf.d echo_supervisord_conf > /etc/supervisor/s

memcached的基本命令(安装、卸载、启动、配置相关)

? 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86

linux网络配置相关文件

网络接口(interface)是网络硬件设备在操作系统中的表示方法,比如网卡在Linux操作系统中用ethX,是由0开始的正整数,比如eth0.eth1...... ethX.而普通猫和ADSL的接口是 pppX,比如ppp0等: 机器中所有可用网卡及名字: 参考:linux网络配置相关命令.虚拟网络接口eth0:0 网关GateWay配置地址: /etc/sysconfig/network  GATEWAY=192.168.1.250 /etc/sysconfig/network-script

Nginx+uWSGI+Supervisor配置

系统是Ubuntu16 Nginx 安装nginx sudo apt-get install nginx nginx的操作 sudo service nginx start sudo service nginx stop sudo service nginx restart 测试nginx是否能用 在浏览器输入服务器的ip地址,出现nginx欢迎界面,说明启动成功 配置nginx 默认配置文件是/etc/nginx里的nginx.conf,不用管 在/etc/nginx/conf.d下添加一个新

tiny210(S5PV210)LCD控制器RGB配置相关学习记录

最近在弄210LCD的配置,在这里记录下一些学习的东西,有错恳请指正,互相学习. datasheet里面有好多名词,先记录一下一些名词的大概意思: alpha blending:本来采用R.G.B三通道来表示颜色,但是显示控制器分为5个图层,故图层混合时需要按照一定的比例因子来混合以实现图层的透明度,而不至于将背景图层完全覆盖掉,现在增加alpha通道来作为那个颜色混合时的调节因子,配置相关的设置后,透过调节alpha值则可以实现图层间透明度的控制,而所谓的透明度,相当于是两图层的按照不同的合成

ubuntu 主机配置相关命令

使用ubuntu系统这么久了,但还主要是停留在简单的使用上,好多关于系统设置方面的命令平时用的少,看书的时候一晃而过,也就忘记了,到用的时候又要去找,很麻烦,今天开始就在这记录平时遇到问题需要解决时查找的一些命令,也方便以后的回忆和查阅. ubuntu下查看电脑的配置: lshw -short H/W path       Device  Class          Description=================================================    

GBrowse配置相关资料

GBrowse配置相关资料(形状.颜色.配置.gff3) http://gmod.org/wiki/Glyphs_and_Glyph_Optionshttp://gmod.org/wiki/GBrowse_Configuration/Glyphs http://gmod.org/wiki/GBrowse_Configuration/Feature_frequency_histograms (2010)http://boyun.sh.cn/bio/?p=1817 (2011  GBrowse之频率

Linux网络属性配置相关命令

Linux网络属性配置相关命令: 前言: Linux属性配置可以分为两类.一类通过命令配置,另一类通过修改配置文件配置. Linux属性配置的相关命令可以分为三大类: 一.ifcfg命令家族:①ifconfig,②route,③netstat,④hostname ①ifconfig命令:主要负责接口及地址查看和管理 ifconfig [INTERFACE] #ifconfig -a:显示所有接口,包括inactive状态的接口.(包括激活和未激活的接口): 如图所示,-a选项将会显示所有接口,包

centOS中网络配置相关文件配置选项说明

CentOS 修改IP地址等网络相关的配置文件 找到对应网卡的IP地址配置文件:ifcfg-eth数字.路径:/etc/sysconfig/network-scripts/ifcfg-eth数字文件内配置项说明 DEVICE=eth0 #描述网卡对应的设备别名,例如ifcfg-eth0的文件中它为eth0  BOOTPROTO=static #设置网卡获得ip地址的方式,选项有:static(静态),dhcp(通过DHCP获取IP)或bootp(使用BOOTP协议获得IP)  BROADCAST