supervisorctl配置说明


[program|fcgi-program:名称]

首行用于定义程​序类型及名称(至于program和fcgi-program区别自己百度解决,不过一般大部分都用program

directory:工作目录

command:要执行的命令

这个命令可以是shell脚本路径,也可以是直接执行的命令行



需要注意的是如果是shell脚本路径一般脚本内会有多条执行命令,如果停止的话可能就不正常了,这时候就需要添加stopasgroup=true,killasgroup=true命令


stdout_logfile:标准日志输出文件

stderr_logfile:错误日志输出文件

如果错误文件不进行单独的日志文件输出,则要用到下面的参数

redirect_stderr:true|false   

是否重定向错误到标准输出中

stdout_logfile_backups:标准日志文件备份数量

stderr_logfile_backups:错误日志文件备份数量


stopasgroup=true|false

是否停止整个进程组

killasgroup=true|false

是否杀掉整个进程组


# Automatically start and recover processes

autostart=true

autorestart=true

这两不知道干嘛用的,可能是supervisor主服务启动时是否也启动节点吧


下面的这些参数应该只是针对于程序类型是program多进程的情况,另外多进程command一般也不太一样


# Number of processes to startup, roughly the number of CPUs you have

numprocs=5

配置进程数


# Give each process a unique name so they can be told apart

process_name=asgi_w_%(process_num)d

配置每个进程名称


supervisorctl配置说明
YourCompany, Mitchell Admin 2025年5月28日
分析这篇文章
标签
存档
win10+Xming+Xshell显示远程linux服务器的图形程序窗口