Ubuntu 僵尸进程查看与清理

2021-04-03  本文已影响0人  LionPig

发现问题
登录Ubuntu系统是提示 There is 1 zombie process.

相关资料

APEU2对于 僵尸进程(zombie process)的定义:
In UNIX System terminology, a process that has terminated, but whose parent has not yet waited for it, is called a zombie.
父线程在子线程结束时,没有进入wait方法获取子线程的终止状态,子线程终止后就是僵尸进程。

查看僵尸进程

使用 ps aux | grep Z 查看STATZ的进程

解决方法

kill父进程
ps -e -o ppid,stat | grep Z | cut -d" " -f2 | xargs kill -9

上一篇 下一篇

猜你喜欢

热点阅读