Skip to content

Instantly share code, notes, and snippets.

@xmedeko
Created May 22, 2013 13:42
Show Gist options
  • Save xmedeko/5627608 to your computer and use it in GitHub Desktop.
Save xmedeko/5627608 to your computer and use it in GitHub Desktop.
jdump - JDK heap dump, wrapper around jmap (and jps)
#!/bin/sh
## Wrapper around jmap (and jps).
## Usage: PID file
if [[ "$#" -le 0 ]]; then
jps -ml
echo
echo "Usage: $(basename $0) PID file"
exit
fi
jmap -dump:live,file="$2" "$1"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment