Created
June 15, 2015 16:18
-
-
Save rye/682b8b84e4e8fa0da787 to your computer and use it in GitHub Desktop.
Print out a list of PID's that are defunct
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 | |
ruby -e "\"`ps -ef|grep \<defunct\>`\".split(/$/).each{|l|puts(l.match(/^(?<user>\w+)\W+(?<pid>\d+)\W+(?<ppid>\d+)/)[:pid])}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment