M BUZZ CRAZE NEWS
// general

OOM score for every process

By Jessica Wood

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_score

If 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

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy