Created
December 7, 2016 18:02
-
-
Save jwthomp/696047418e7df5892a61103b5ef73564 to your computer and use it in GitHub Desktop.
View memory on OS X from cli
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
Place in .profile | |
ViewMemory() { | |
vm_stat | perl -ne '/page size of (\d+)/ and $size=$1; /Pages\s+([^:]+)[^\d]+(\d+)/ and printf("%-16s % 16.2f Mi\n", "$1:", $2 * $size / 1048576);' | |
} | |
alias free=ViewMemory |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment