On Linux to discover which processes are using all the swap
- run top
- press ‘O’ (capital letter o)
- then ‘p’
- then ‘enter’
Processes should be sorted by their swap usage.As shown in the screen below the minilogd process is using all the swap space on this machine.
Looks like minilogd was gradually using up swap because someone had switched off syslog. So the logs had to go somewhere and minilog was looking after them (in memory then swap) until syslog would re-appear – which it didn’t. So to solve the issue we killed minilogd (and lost the logs in memory/swap which we didn’t care too much about obviously) then started syslog and stability has been restored.