supervisorctl 進程管理
1.查看所有子進程的狀態(tài)
[root@wghpt_tomcat2031_8006 ~]# supervisorctl status
dfs? ? ? ? ? ? ? ? ? ? ? ? ? ? ? RUNNING? pid 56001, uptime 151 days, 0:26:28
sshd? ? ? ? ? ? ? ? ? ? ? ? ? ? RUNNING? pid 8, uptime 207 days, 0:04:20
tomcat? ? ? ? ? ? ? ? ? ? ? ? ? RUNNING? pid 125004, uptime 14:35:38
第一列是服務名;
第二列是運行狀態(tài),RUNNING表示運行中,F(xiàn)ATAL 表示運行失敗,STARTING表示正在啟動,STOPED表示任務已停止;
第三/四列是進程號,最后是任務已經(jīng)運行的時間。
2.查看單個任務狀態(tài): supervisorctl status 服務名
[root@wghpt_tomcat2031_8006 ~]# supervisorctl status dfs
dfs? ? ? ? ? ? ? ? ? ? ? ? ? ? ? RUNNING? pid 56001, uptime 151 days, 0:28:15
3.關(guān)閉任務:supervisorctl stop 服務名
supervisorctl stop dfs
supervisorctl stop all? ? ? ? ? ? 關(guān)閉所有進程
supervisorctl stop tomcat? 關(guān)閉tomcat
4.啟動任務:supervisorctl start 服務名
supervisorctl start dfs
supervisorctl start all? ? ? 啟動所有進程
supervisorctl start tomcat 啟動tomcat
5.重啟任務:supervisorctl restart 服務名
supervisorctl restart dsf
————————————————
版權(quán)聲明:本文為CSDN博主「惟肖肖肖」的原創(chuàng)文章,遵循CC 4.0 BY-SA版權(quán)協(xié)議,轉(zhuǎn)載請附上原文出處鏈接及本聲明。
原文鏈接:https://blog.csdn.net/xc_123/article/details/93971706