Skip to content

Instantly share code, notes, and snippets.

@maesa
Last active October 19, 2021 08:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save maesa/53c6487b886027272c5440efcc80a9f8 to your computer and use it in GitHub Desktop.
Save maesa/53c6487b886027272c5440efcc80a9f8 to your computer and use it in GitHub Desktop.
Find zombie process and its parent
# 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