当前位置:网站首页>Supervisor installation and use
Supervisor installation and use
2022-07-23 14:56:00 【lionwerson】
supervisord Install and use
supervisord brief introduction :
supervisord It's a c/s Mode process manager , It can be used to monitor the progress of applications , And it can manage the application start/stop/restart/reload And so on .
install supervisord:
[email protected]:~# apt-get install supervisord -y #apt install supervisord
[email protected]:~# supervisord -v #supervisord edition
3.3.1
supervisord The configuration file :
supervisord Default path of configuration file :/etc/supervisor/supervisord.conf
[email protected]:~# vim /etc/supervisor/supervisord.conf
; supervisor config file
[unix_http_server]
file=/var/run/supervisor.sock ; (the path to the socket file)
chmod=0700 ; sockef file mode (default 0700)
[supervisord]
logfile=/var/log/supervisor/supervisord.log ; (main log file;default $CWD/supervisord.log)
pidfile=/var/run/supervisord.pid ; (supervisord pidfile;default supervisord.pid)
childlogdir=/var/log/supervisor ; ('AUTO' child log dir, default $TEMP)
; 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:///var/run/supervisor.sock ; use a unix:// URL for a unix socket
; 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 = /etc/supervisor/conf.d/*.conf # Process monitoring configuration path
[inet_http_server] #web Page port
port=*:9080 #web Page address :9080 or *:9080
username=admin #web User name and password of the page
password=admin
supervisord Monitor process Profile :
# Configure monitored applications :
[email protected]:~# vim /etc/supervisor/conf.d/prometheus.conf
# User program is prometheus
[program:prometheus]
# Start command , Out of commission nohup Wait for the background to run the command, otherwise the application will restart indefinitely
command=/usr/local/prometheus/prometheus --config.file=/usr/local/prometheus/prometheus.yml
autostart=true # Auto start
autorestart=true # Automatic restart
process_name=prometheus # Process name
startretries=5 # Number of attempts to start
start-up supervisord Program :
[email protected]:~# systemctl start supervisor.service #
open http://IP:9080, Enter the user name and password, and you can go to web Page view monitored applications :

supervisordctl Command line
| command | Parameters | effect |
|---|---|---|
| supervisorctl | stop program:name | Stop an application in the configuration file |
| supervisorctl | start program:name | Start an application in the configuration file |
| supervisorctl | restart program:name | Restart an application in the configuration file |
| supervisorctl | stop all | Stop the whole process |
| supervisorctl | relod | Load a new configuration file and start the application |
| supervisorctl | update | Load a new configuration file to start , Do not restart the process without changing |
| supervisorctl | tail program:name | Check the application log |
[email protected]:~# supervisorctl start prometheus
prometheus: started
[email protected]:~# supervisorctl stop prometheus
prometheus: stopped
[email protected]:~#
边栏推荐
- mysql唯一索引无重复值报错重复
- mysql函数汇总之字符串函数
- 深度学习单图三维人脸重建
- Live classroom system 03 supplement model class and entity
- Design and implementation of websocket universal packaging
- Official wechat product! Applet automation framework minium sharing Preview
- 【数组&&字符串&&宏练习题】
- [WinForm] desktop program implementation scheme for screenshot recognition and calculation
- Live classroom system 02 build project environment
- mysql 之general_log日志
猜你喜欢
![[C language] number guessing game + shutdown applet](/img/2f/643ec964dba7643f91b1bd679a9284.png)
[C language] number guessing game + shutdown applet

Feignclient utilise un tutoriel détaillé (illustration)

深度学习单图三维人脸重建

After using vscode to format the code, save and find that the code is messy again. What should I do? Vs remove formatting

Uni app knowledge points and records of problems and solutions encountered in the project

Advanced operation and maintenance 03
![[record of question brushing] 19. Delete the penultimate node of the linked list](/img/be/7e81e9376cb04566d669db4c606309.png)
[record of question brushing] 19. Delete the penultimate node of the linked list

cmake笔记
![[interview frequency] cookies, sessions, tokens? Don't worry about being asked after reading it](/img/c0/46f2a99ef2ed0b5d4d5c77a143b160.png)
[interview frequency] cookies, sessions, tokens? Don't worry about being asked after reading it

OpenHarmony南向学习笔记——Hi3861+HC-SR04超声波检测
随机推荐
4. Find the median of two positive arrays
numpy和pytorch的版本对应关系
【小程序自动化Minium】三、元素定位- WXSS 选择器的使用
@FeignClient使用詳細教程(圖解)
俄方希望有效落实农产品外运“一揽子”协议
身份证号正则验证
452. Detonate the balloon with the minimum number of arrows
【无标题】
@Feignclient detailed tutorial (illustration)
R language practical application case: drawing part (III) - drawing of multiple combination patterns
对象使用过程中背后调用了哪些方法
【C語言】猜數字小遊戲+關機小程序
[record of question brushing] 19. Delete the penultimate node of the linked list
C language introduction practice (11): enter a group of positive integers and sum the numbers in reverse order
OpenCV计算外包矩形
头部姿态估计原理及可视化_loveliuzz的博客-程序员宅基地_头部姿态估计
dataframe.groupby学习资料
The pit trodden by real people tells you to avoid the 10 mistakes often made in automated testing
Openharmony South learning notes - hi3861+hc-sr04 ultrasonic testing
【数组&&字符串&&宏练习题】