kill -9 process kills the dead process

Use ps and grep commands to find zombie processes.
Insert picture description here
Command notes: -A parameter lists all processes -o custom output fields. We set the display fields to stat (status), ppid (process parent id), pid (process id), cmd ( Command) These four parameters are because the process whose status is z or Z is a zombie process, so we use grep to capture the stat status of the zZ process. The running results are as follows:
Insert picture description here
At this time, we can use kill -HUP 12339 to kill this zombie process
after the run, you can run again
Insert picture description here
to confirm whether the zombies kill If not kill child processes, you can try to kill the parent process to solve the problem, such as the above examples of the parent process pid is 12334, then we run
Insert picture description here
to solve the problem
can generally be Use the top command to find the dynamic process table,
Insert picture description here
where zombie is a zombie process

Guess you like

Origin blog.csdn.net/qq_34939308/article/details/115022728