Last active
October 19, 2021 08:50
-
-
Save maesa/53c6487b886027272c5440efcc80a9f8 to your computer and use it in GitHub Desktop.
Find zombie process and its parent
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# You'll find duplicated ppid, those ppid are zombie parent | |
ps axo user,ppid,pid,comm | grep defunct | |
# Kill zombie parent | |
kill -9 $(ps axo ppid,comm | grep defunct | awk '{print $1}' | sort -u) | |
or | |
kill -9 $(ps -xal | grep -w Z | grep -v grep | awk '{print $4}') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment