您当前的位置: 首页 >  linux
  • 0浏览

    0关注

    1477博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

linux 停止某个应用程序的所有进程 如kill所有nginx进程

软件工程小施同学 发布时间:2021-03-08 16:02:02 ,浏览量:0

kill所有nginx进程 查看所有nginx进程
[root@iZ2zeimdylgs1p79hmwbayZ ~]# ps -ef | grep nginx
root      1297  3334  0 15:54 pts/1    00:00:00 grep --color=auto nginx
root      1419  1364  0 2月08 ?       00:00:00 s6-supervise nginx
root      1423  1419  0 2月08 ?       00:00:00 nginx: master process nginx -g daemon off;
100       1425  1423  0 2月08 ?       00:00:07 nginx: worker process
root     23229 13177  0 2月23 ?       00:00:00 runsv nginx
root     23231 23229  0 2月23 ?       00:00:00 nginx: master process /opt/gitlab/embedded/sbin/nginx -p /var/opt/gitlab/nginx
polkitd  23233 23231  0 2月23 ?       00:00:00 nginx: worker process
polkitd  23234 23231  0 2月23 ?       00:00:00 nginx: worker process
polkitd  23235 23231  0 2月23 ?       00:00:00 nginx: worker process
polkitd  23236 23231  0 2月23 ?       00:00:00 nginx: worker process
polkitd  23237 23231  0 2月23 ?       00:00:00 nginx: worker process
polkitd  23238 23231  0 2月23 ?       00:00:00 nginx: worker process
polkitd  23239 23231  0 2月23 ?       00:00:00 nginx: worker process
polkitd  23240 23231  0 2月23 ?       00:00:01 nginx: worker process
polkitd  23242 23231  0 2月23 ?       00:00:02 nginx: worker process
删掉所有nginx进程
kill -9 $(ps aux | grep 'nginx' | grep -v grep | tr -s ' '| cut -d ' ' -f 2)

 

 

 

原理

https://www.cnblogs.com/whm-blog/p/10817843.html

 

关注
打赏
1665320866
查看更多评论
立即登录/注册

微信扫码登录

0.0423s