find what killed a process
A program vanished or says "Killed": usually the kernel ran out of memory and stopped it. Find out.
Steps
-
sudo dmesg -T | grep -i -E 'killed process|out of memory'the kernel's out-of-memory kills, with times
-
journalctl -k | grep -i oomthe same from the journal
-
journalctl -u NAME --since todaya service's own last words
-
echo $?right after it ended: 137 means killed by force (128 + 9), 143 asked to stop
-
free -hhow much memory and swap there is
Commands used
dmesgjournalctlfree
Each has a page in lore: lore dmesg opens it.
Related recipes
- see a program's memory useHow much memory a program really uses, and which programs use the most.
- what is slowing the machineSee whether the processor, the memory or a disk is the bottleneck, and which program is behind it.
- add a userCreate an account with a home folder and a password, and let it use sudo if it should.
- count the processorsHow many processors and cores this machine has, and what they are.