Last active
August 29, 2015 14:07
-
-
Save bindiego/8b9a437e6a1b7dca4262 to your computer and use it in GitHub Desktop.
Kill zombies
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
#!/bin/sh -ex | |
# find zombie pid | |
# ps aux | awk '{ print $8 " " $2 }' | grep -w Z | |
# kill -9 PID | |
# All in one cmd does all | |
kill -HUP `ps -A -ostat,ppid | grep -e '^[Zz]' | awk '{print $2}'` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment