I use CentOS 7 with kernel 3.1.0

I know there is a hitman in Linux called oom killer which kills a process that uses too much memory out of available space.

I want to configure it to log the activities so that I can check whether it happens or not. How can I set it up?


  • Last I checked the OOM killer was not shy about spamming the system logs with logs...
    – thrig
    Mar 28, 2017 at 14:22

1 Answer 1


OOMkiller's activities are guaranteed to be in /var/log/dmesg (at least for a time). Usually the system logger daemon will also put it in /var/log/messages by default on most distributions with which I've worked.

These commands might be of help in tracking the logs down:

grep oom /var/log/*
grep total_vm /var/log/*

This answer has more details about parsing those log entries to see exactly what is going on.

  • Ran the above two commands and nothing appeared. But my java application was killed by OS. I am using centos server.
    – Al-Alamin
    Jun 25, 2018 at 10:52
  • Yeah, CentOS doesn't seem to put it in /var/log/dmesg here either. And unfortunately I don't have access to /var/log/messages on this system to check that (owned/only accessible by root).
    – Izkata
    Jun 26, 2019 at 17:57
  • Be careful with grep in those dirs it sometimes dies with grep: memory exhausted for me :)
    – rogerdpack
    Dec 14, 2021 at 21:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .