In response to this.
Take a look to the questions about configuring the OOM killer. For example:
Is there a way to see the OOM score for every process instead of each individually?
1 Answer
At its simplest, you could just do
cat /proc/*/oom_scoreIf you want more information - such as the PIDs and command string as well - then maybe a simple loop like
while read -r pid comm; do printf '%d\t%d\t%s\n' "$pid" "$(cat /proc/$pid/oom_score)" "$comm"
done < <(ps -e -o pid= -o comm=) 1