常用進程相關操作

1,查看使用指定端口的進程

lsof -i TCP:9001
COMMAND   PID    USER   FD   TYPE     DEVICE SIZE NODE NAME
java    11704 webroot   74u  IPv6 3655631084       TCP *:etlservicemgr (LISTEN)


2,查看指定名字的進程

ps -ef | grep nginx
root       500 32426  0 12:31 pts/0    00:00:00 grep nginx
root      9483     1  0 11:12 ?        00:00:00 nginx: master process /usr/local/nginx/sbin/nginx
nobody    9484  9483  0 11:12 ?        00:00:00 nginx: worker process      
nobody    9485  9483  0 11:12 ?        00:00:00 nginx: worker process      
nobody    9486  9483  0 11:12 ?        00:00:00 nginx: worker process     

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章