1
我有一個要求,即從服務器獲取所有節點進程pid。我知道ps
和所有類似的。但問題是,像PM2守護程序(實際節點處理)如何知道在服務器上運行的所有節點進程
[[email protected] Python]# ps -lef | grep pm2
0 S root 919 29043 0 80 0 - 29260 pipe_w 16:53 pts/2 00:00:00 grep --color=auto pm2
4 S root 8192 1 0 80 0 - 304940 ep_pol Apr17 ? 14:40:53 PM2 v2.4.0: God Daemon (/root/.pm2)
如何檢測這些工藝節點工藝???有沒有像/proc
或/sys
或anyotherway ???
看看'pstree' –
你可以請示一個例子嗎?對我來說,pstree也會重新調整。 PM2守護神 –
'├─tmux───bash───node───5* [{}節點]'我得到這個 –