Created
October 10, 2014 15:33
-
-
Save Bklyn/a15cd82b2fc1b13a1f88 to your computer and use it in GitHub Desktop.
Swap space usage by process
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
perl -ne 'chomp; $name=$1 if /Name:\s+([^ ]+)/; $pid=$1 if /^Pid:\s+(\d+)/; \ | |
printf "%-16s %5d %16s\n", $name, $pid, $1 if /VmSwap:\s*([1-9]\d*) kB/' /proc/*/status 2> /dev/null | \ | |
sort -rn -k3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment