Skip to content

Instantly share code, notes, and snippets.

@rossanthony
Last active August 23, 2016 14:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rossanthony/5193a9d1b40c8de07065c2f4509a419e to your computer and use it in GitHub Desktop.
Save rossanthony/5193a9d1b40c8de07065c2f4509a419e to your computer and use it in GitHub Desktop.

Listing all process swap space usage

Type the following bash for loop command to see swap space usage per process:

for file in /proc/*/status ; do awk '/VmSwap|Name/{printf $2 " " $3}END{ print ""}' $file; done | sort -k 2 -n -r | less
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment