Created
June 10, 2014 13:44
-
-
Save pichuang/fe1a2d0dfb1aabb79a8e to your computer and use it in GitHub Desktop.
Display oom_killer all process oom_score
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/bash | |
for proc in $(find /proc -maxdepth 1 -regex '/proc/[0-9]+'); do | |
printf "%2d %5d %s\n" \ | |
"$(cat $proc/oom_score)" \ | |
"$(basename $proc)" \ | |
"$(cat $proc/cmdline | tr '\0' ' ' | head -c 50)" | |
done 2>/dev/null | sort -nr | head -n 10 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment