dfrankow
dfrankow

Reputation: 21387

linux OOM (out of memory) killer email notification?

This answer describes the out of memory killer on Linux.

Is there a way to get notified when the OOM killer has killed something? Email is preferable. One might do this with a watchdog, but I wonder what the easiest and most robust way is.

Upvotes: 9

Views: 3911

Answers (2)

MarkR
MarkR

Reputation: 63538

The "logwatch" program will periodically mail you all log lines it's configured to be interested in.

It can be configured to email you about an OOM (unless it runs out of memory itself).

Email notifications aren't a good substitute for proper monitoring from an external system as a machine which has no free memory will not normally be able to send email.

Also, if your system is important, then email is probably too slow to get a response from Ops (especially out of hours)

Upvotes: 3

user562374
user562374

Reputation: 3897

You can read and interpret the kernel log, as syslog records it to /var/log/, and act upon it.

Upvotes: 0

Related Questions