Skip to content

Reference The 25 checks

Out-of-memory kills

Health check oom

What it reads

The kernel log for the last 24 hours, through journalctl or /var/log/kern.log. In the background, kills are noted as they happen from the system log the agent already follows, so the log is never searched; a scan by hand searches the last 24 hours.

Does it need root?

It needs root for part of what it reads. On Ubuntu the kernel log can be read only by root and the adm group. Without root, that part is skipped and never counted as passed. Run sudo kiyesi scan to include it.

When it passes

The report lists it as passed, in these words:

  • No process was killed for memory in the last 24 hours

What it can find

Critical

The process process was killed for using too much memory at time

This server has total of memory and no swap, so one spike takes the app down.

Fix, to review and run yourself
sudo fallocate -l 1G /swapfile && sudo chmod 600 /swapfile && sudo mkswap /swapfile && sudo swapon /swapfile && echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab
Critical

The process process was killed for using too much memory at time

When memory runs out, Linux kills the biggest process, and everyone using it gets errors. Set a memory limit on the container that grows, or move to a server with more memory.

Fix, to review and run yourself
ps -eo pid,comm,rss --sort=-rss | head -n 6

When it is skipped

A skipped check never counts as passed. The report says why, in one of these sentences:

  • found no kernel log: neither journald nor /var/log/kern.log is on this system
  • the agent has just started noting memory kills as they happen; to search the last 24 hours now, run sudo kiyesi scan