Finding which process was killed by Linux OOM killer

Yang picture Yang · Mar 9, 2009 · Viewed 141.4k times · Source

When Linux runs out of memory (OOM), the OOM killer chooses a process to kill based on some heuristics (it's an interesting read: http://lwn.net/Articles/317814/).

How can one programmatically determine which processes have recently been killed by the OOM killer?

Answer

John Feminella picture John Feminella · Mar 9, 2009

Try this out:

grep -i 'killed process' /var/log/messages