Cryptocurrency mining or another unauthorised workload consuming the machine's memory.
What gives it awayAn unfamiliar process high in the candidate table, often with a plausible-looking name, running from a temp or user-writable path.
ATT&CK T1496Nothing matches that yet. Tell us what you were looking for and it goes on the list.
Linux kernel · Event Out of memory: Killed process
Linux ran out of memory and picked something to kill. It does not kill whatever caused the problem — it kills whatever scores highest, which is usually the largest process. That is why the database dies when a backup script leaks memory.
Also written as Out of memory: Killed processoom-killer invokedlinux oom killer logKilled process total-vm anon-rss
Your computer ran out of memory and Linux shut a program down to keep going. Nothing is damaged. If it keeps happening, either something is using far more memory than it should or the machine genuinely needs more.
Read the whole block, not the summary line — the kernel prints a table of every candidate process with its memory usage and score just above the kill, and that table tells you what was actually consuming the memory, which is frequently not what got killed. Distinguish a system-wide OOM from a cgroup OOM: under systemd or a container runtime, 'Memory cgroup out of memory' means one unit hit its own limit while the machine had memory to spare, and the fix is the limit, not the machine. Also worth knowing that Linux overcommits by default, so allocation succeeds long before memory exists and the failure surfaces at first touch rather than at malloc.
Sanitised. Addresses come from the RFC 5737 documentation ranges.
kernel: node invoked oom-killer: gfp_mask=0x140cca(GFP_HIGHUSER_MOVABLE|__GFP_COMP), order=0, oom_score_adj=0
kernel: Tasks state (memory values in pages):
kernel: [ pid ] uid tgid total_vm rss pgtables_bytes swapents oom_score_adj name
kernel: [ 1187] 999 1187 412883 198442 1802240 0 0 postgres
kernel: [ 4021] 1000 4021 1204553 882014 7442432 0 0 node
kernel: Out of memory: Killed process 1187 (postgres) total-vm:1651532kB, anon-rss:793768kB, file-rss:0kB, shmem-rss:0kB, UID:999 pgtables:1760kB oom_score_adj:0 Everything else in the log line is context.
0The default. No adjustment. -1000Exempt — the kernel will not choose this process. Reserved for things whose death makes the situation worse. A positive valueMade more likely to be killed. Often set deliberately on batch jobs so they die before services do. Most of the time it is one of these.
What gives it awayAn unfamiliar process high in the candidate table, often with a plausible-looking name, running from a temp or user-writable path.
ATT&CK T1496What gives it awayRepeated OOM kills of the same service with the memory pressure coming from a process that appeared recently and has no owner.
ATT&CK T1499.001What gives it awayAn agent or logging daemon appearing as the victim repeatedly, particularly if its oom_score_adj was recently changed from a protective value.
ATT&CK T1562.001grep -i 'killed process' /var/log/syslog /var/log/messages 2>/dev/null | tail -20 journalctl -k --since '7 days ago' | grep -B 40 'Out of memory' | less dmesg -T | grep -E 'oom-kill|Out of memory|Memory cgroup out of memory' systemctl show <unit> -p MemoryMax -p MemoryHigh -p MemoryCurrent Because it chooses by score, and the score is dominated by how much memory a process is using right now. A database holding a large cache legitimately looks like the biggest consumer on the machine, so it gets chosen even when a smaller process caused the shortage by growing. The table printed above the kill shows every candidate and is the way to find the real cause.
total-vm is address space the process has reserved, which can be far larger than anything it actually uses — Linux hands out reservations freely. anon-rss is private memory genuinely resident in RAM. When working out what consumed the memory, anon-rss is the number to read; total-vm regularly causes people to blame the wrong process.
It delays it rather than preventing it, and the delay is genuinely useful because a machine under memory pressure with swap slows down noticeably first, which gives you a chance to notice. Without swap the kernel goes from fine to killing things with very little warning. Swap does not fix a leak, though — it only buys time.
One control group hit its own memory limit while the machine as a whole still had memory free. That is what container memory limits and systemd's MemoryMax produce. The fix is the limit or the workload inside it, not the size of the machine, and adding RAM to the host changes nothing.
Write a negative value to /proc/<pid>/oom_score_adj, or set OOMScoreAdjust in its systemd unit, with -1000 making it exempt entirely. Use this sparingly: exempting a process does not create memory, it just means the kernel kills something else. If the exempted process is the one leaking, you have removed the only thing keeping the machine alive.
Last reviewed 6 September 2026