Created
September 8, 2017 10:37
-
-
Save caoxudong/164919a8c8a410417303476f4e9c8938 to your computer and use it in GitHub Desktop.
倒序查看进程占用的swap分区资源
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
for file in /proc/*/status ; do awk '/VmSwap|^Pid/{printf $2 " " $3}END{ print ""}' $file; done | sort -k 2 -n -r | head |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment