How to find the zombie process and Kill, can't kill the parent process and kill

  

Use the ps and grep commands to find the zombie process #ps -A -ostat,ppid,pid,cmd |  Grep -e '^[Zz]' command comment: -A parameter lists all processes -o custom output field We set the display field to stat (status), ppid (process parent id), pid (process id), cmd (Command) These four parameters because the state is z or Z process is a zombie process, so we use grep to grab the stat state for the zZ process running results refer to the following Z 12334 12339 /path/cmd, then we can use kill -HUP After 12339 to kill this zombie process, you can run ps -A -ostat, ppid, pid, cmd again |  Grep -e '^[Zz]' to confirm if the zombie process has been killed. If the kill child process is invalid, you can try to kill its parent process to solve the problem. For example, the parent process pid is 12334, then we run #kill -HUP 12334 to solve the problem


Generally you can use the top command to find the dynamic process table

#top


where zombie is Zombie process

Copyright © Windows knowledge All Rights Reserved