We had some weird attack causing some of our front machines to run into swap and even run out of swap. Now the logfiles only show "out of swap" errors, which doesnt really help to find out what process exactly forced the system into crash - and ideas how I could improve logging to tackle / maybe even kill swapping processes?
Code:
# tail -n 2 /var/log/messages
Sep 28 09:06:43 gateway-001 kernel: swap zone exhausted, increase kern.maxswzone
Sep 28 09:06:43 gateway-001 last message repeated 192 times
# sysctl -a | grep "kern.maxswzone"
kern.maxswzone: 33554432
# swapinfo
Device 1K-blocks Used Avail Capacity
/dev/ad4s1b 16777216 0 16777216 0%