Skip to content

Instantly share code, notes, and snippets.

@caoxudong
Created September 8, 2017 10:37
Show Gist options
  • Save caoxudong/164919a8c8a410417303476f4e9c8938 to your computer and use it in GitHub Desktop.
Save caoxudong/164919a8c8a410417303476f4e9c8938 to your computer and use it in GitHub Desktop.
倒序查看进程占用的swap分区资源
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