Created
March 3, 2012 14:37
-
-
Save kshimo69/1966463 to your computer and use it in GitHub Desktop.
smapsの情報をいい感じに合計して出力する ref: http://qiita.com/items/2980
This file contains 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 i in /proc/[0-9]*; do echo "==== $i ===="; for j in Rss Shared Private Swap; do printf "%-10s" $j; grep $j $i/smaps | awk 'BEGIN{n=0}{n += $2}END{printf "%8s (kB)\n", n}'; done; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment