Skip to content

Instantly share code, notes, and snippets.

@eklitzke
Created July 23, 2012 15:45
Show Gist options
  • Save eklitzke/3164318 to your computer and use it in GitHub Desktop.
Save eklitzke/3164318 to your computer and use it in GitHub Desktop.
find allocated memory for a process
#!/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