Check which processes are using swap (BASH)
Simple command to check which processes are using swap (and how much). Can be used to help track down the source of high swap usage
Details
- Language: BASH
Snippet
for file in /proc/*/status ; do awk '/VmSwap|Name/{printf $2 " " $3}END{ print ""}' $file; done | sort -k 2 -n -r | less