Try: ps -eo pid,ppid,stat,cmd | awk '$3 ~ /Z/'
Info: Zombies have STAT=Z and are already-dead processes waiting for their parent to reap them. You cannot kill a zombie directly. Send SIGCHLD to its parent process (PPID) to prompt it to reap the child.
Examples:
- $ ps aux | grep defunct # Quick search for zombies
- $ kill -SIGCHLD <PPID> # Prompt parent to reap children
- $ kill -9 <PPID> # Last resort if parent is unresponsive
Note: Zombies consume almost no CPU or memory, but they continue to occupy process-table/PID entries. If SIGCHLD does not clear them, the parent may not be handling child termination correctly. Restarting or terminating the parent can cause the zombies to be reparented and subsequently reaped, but identify the parent carefully before using kill -9.
Leave a Reply