Skip to content

Instantly share code, notes, and snippets.

@ckng
Created November 2, 2015 13:31
Show Gist options
  • Save ckng/31f87ed9753166d078cb to your computer and use it in GitHub Desktop.
Save ckng/31f87ed9753166d078cb to your computer and use it in GitHub Desktop.
Ubuntu: Check swap space usage by processes
#!/bin/bash
for file in /proc/*/status ; do awk '/VmSwap|Name/{printf $2 " " $3}END{ print ""}' $file; done | sort -k 2 -n
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment