Created
July 23, 2012 15:45
-
-
Save eklitzke/3164318 to your computer and use it in GitHub Desktop.
find allocated memory for a process
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
#!/bin/bash | |
# | |
# Get "allocated" memory for a process (not including shmem!) | |
pmap $1 | egrep ' anon|stack ' | awk '{s += $2} END {printf "%1.1fM\n", s / 1024.}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment