如何KILL<defunct> process

来源:互联网 发布:岛国片在淘宝怎么搜索 编辑:程序博客网 时间:2024/06/06 05:30

From your output we see a "defunct", which means the process has either completed its task or has been corrupted or killed, but its child processes are still running or these parent process is monitoring its child process. To kill this kind of process kill -9 PID don't work, you can try to kill with this command but it will show this again and again.

Determine which is the parent process of this defunct process and kill it. To know this run the command:

ps -ef | grep defunct

UID          PID     PPID       C    STIME      TTY          TIME              CMD1000       637      27872      0   Oct12      ?        00:00:04 [chrome] <defunct>1000      1808      1777       0    Oct04     ?        00:00:00 [zeitgeist-datah] <defunct>

Then kill -9 637 27872 then verify the defunct process is gone by ps -ef | grep defunct.



搞不定的话:终极指令

to automate the kill, you can do this, too (might need to change which bytes you're cutting from the output):ps -ef | grep defunct | grep -v grep | cut -b8-20 | xargs kill -9

原创粉丝点击