jingzaixin

可以用ps和grep命令寻找僵尸进程

ps -A -ostat,ppid,pid,cmd | grep -e \'^[Zz]\'

命令选项说明:

-A 参数列出所有进程
-o 自定义输出字段 我们设定显示字段为 stat(状态), ppid(进程父id), pid(进程id),cmd(命令)这四个参数
因为状态为 z或者Z的进程为僵尸进程,所以我们使用grep抓取stat状态为zZ进程

 

 

kill僵尸进程:

kill  -9  3064

 

参考网址:https://blog.csdn.net/weixin_34161083/article/details/92105239

分类:

技术点:

相关文章:

  • 2023-03-23
  • 2021-11-20
  • 2021-11-20
  • 2021-11-20
  • 2021-06-15
  • 2021-11-20
  • 2021-11-20
猜你喜欢
  • 2021-11-20
  • 2021-11-20
  • 2021-11-20
  • 2021-11-11
  • 2021-11-13
  • 2021-11-20
  • 2021-11-20
相关资源
相似解决方案