Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We use Nagios to monitor our servers. Now.. linux uses all the RAM we give them so there is no way to detect if we are about to run out of memory. We have a couple of times had some server crashes due to excessive memory usage.

Is there any way to detect if ubuntu(linux) launches the OOM killer? I know its written in the log files but is there anyway to detect when it is launched?


share|improve this question
up vote 1 down vote accepted

You can not see when OOM passes by, the only way is to check the logs and hope it's there (sometimes it doesn't get recorded).

There are tools to check memory usage with Nagios, I personally use

share|improve this answer
But how can it monitor RAM usage when linux uses all RAM for cache? When I look at a server with 4GB RAM it has almost none free RAM when looking in top. – Ronnie Jespersen Aug 9 '12 at 21:07
There is a switch for that, refer to its manual, it clearly states how you can program it to see the real memory usage and considering how much cache is used. – Lucas Kauffman Aug 9 '12 at 22:41
Great! Thanks Lucas – Ronnie Jespersen Aug 10 '12 at 7:49

Obviously it is launched when you don't have enough free virtual memory and an appication requests a memory region from the kernel. So what you really should monitor is your free memory size. And load average is a subject to monitor too because it always gets high when there is not enough free memory.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.