find what killed a process

A program vanished or says "Killed": usually the kernel ran out of memory and stopped it. Find out.

processessystem

steps
  1. sudo dmesg -T | grep -i -E 'killed process|out of memory'

    the kernel's out-of-memory kills, with times

  2. journalctl -k | grep -i oom

    the same from the journal

  3. journalctl -u NAME --since today

    a service's own last words

  4. echo $?

    right after it ended: 137 means killed by force (128 + 9), 143 asked to stop

  5. free -h

    how much memory and swap there is

commands used

dmesgjournalctlfree

Each has a page in lore: lore dmesg opens it.