Thursday, June 9, 2022

Linux - what's using my swap?

 A quick way to find what is using the most swap:


for file in /proc/*/status ; do awk '/VmSwap|Name/{printf $2 " " $3}END{ print ""}' $file; done | sort -k 2 -n  | tail