如何KILL process

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              CMD

1000       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

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