Last active
August 29, 2015 13:58
-
-
Save hkoba/10211938 to your computer and use it in GitHub Desktop.
List all processes still using deleted libssl, in Zsh. (To fight against heartbleed and future vulnerability...)
This file contains hidden or 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/zsh | |
typeset -A dup; dup=() | |
grep libssl /proc/*/maps|grep deleted|while read fn rest; do | |
pid=${${fn#/proc/}//\/*/} | |
((dup[$pid]++)) && continue | |
echo -n $pid " "; readlink /proc/$pid/exe | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment