Finding which process was killed by Linux OOM killer

Try this out:

grep "Killed process" /var/log/syslog

Now dstat provides the feature to find out in your running system which process is candidate for getting killed by oom mechanism

dstat --top-oom
 --out-of-memory---
  kill score
 java           77
 java           77
 java           77

and as per man page

  --top-oom
          show process that will be killed by OOM the first

Try this out:

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

Try this so you don't need to worry about where your logs are:

dmesg -T | egrep -i 'killed process'

-T, --ctime - Print human-readable timestamps.