Para ver si ya hay swap:
root@c2-30-gra11:/home/debian# free -m
total used free shared buff/cache available
Mem: 29382 17928 2992 129 9105 11454
Swap: 4095 0 4095
Para crearla si no hay:
sudo fallocate -l 4G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
Para ver si algún proceso murió por falta de memoria:
sudo dmesg | grep -i "out of memory"

Hey! Qué opinas sobre el artículo?