Created
February 8, 2016 16:52
-
-
Save efasel/2d56652d08316a1c0930 to your computer and use it in GitHub Desktop.
sorted list of processes with amount of swapped memory
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
#!/bin/bash | |
for pid in $(cd /proc && find . -maxdepth 2 -type f -name status | grep -o '[0-9]*'); do grep -q VmSwap /proc/$pid/status > /dev/null 2>&1 && echo -n "$(grep VmSwap /proc/$pid/status)" && ps h -p $pid -o args ; done | sort -k 2 -n -r | cut -c 1-200 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment