安装
yum install supervisor -y
用户配置文件
cd /etc/supervisor/conf.d/
cat testsssping.ini
[program:testsssping]
#command=sh /data/test.sh
stderr_logfile=/tmp/supervisor.err.log
stdout_logfile=/tmp/supervisor.out.log
command=ping www.baidu.com
autostart=true
autorestart=true
user=otoyix
startsecs=5
启动
systemctl start supervisord.service
supervisorctl restart/stop/restart/start testsssping
testsssping: stopped
testsssping: started
[root@VM-16-15-centos supervisord.d]# supervisorctl status
testsssping RUNNING pid 27746, uptime 0:00:32
[root