View Linux zombie processes

Time:2022-1-14

Zombie processes are bracketed

command
pstree -ap|grep php

|-php-fpm7.2,1358                      
  |   |-php-fpm7.2,1624                                                            
  |   `-php-fpm7.2,1633                                                            
  |   |           `-php,2502 process.php
  |   |               |-(php,2503)
  |   |               |-(php,2504)
  |   |               `-(php,2505)

View command

ps -A -o stat,ppid,pid,cmd | grep -e ‘^[zZ]’

[email protected]:~$ ps -A -o stat,ppid,pid,cmd | grep -e '^[zZ]'
Z+    2502  2503 [php] <defunct>
Z+    2502  2504 [php] <defunct>
Z+    2502  2505 [php] <defunct>

Kill – HUP process number

This work adoptsCC agreement, reprint must indicate the author and the link to this article