Skip to content

Instantly share code, notes, and snippets.

@jeffrade
Created October 9, 2018 21:26
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save jeffrade/eee66c9f0c16cb97d41bb66780b3e7a4 to your computer and use it in GitHub Desktop.
JDK Tools for Java Processes
##########################################################
### This file is not meant to be executed as a script! ###
### Usually found in $JAVA_HOME/bin ###
##########################################################
# Simply run this when you have any Java process running (launches a GUI). Choose your pid.
jconsole
# Run the following three commands in succession then navigate to http://localhost:7000/:
jps # To find your Java <pid>
jmap -dump:file=my_heap_dump.hprof <pid> # Your <pid> from jps output
jhat my_heap_dump.hprof # This can take a while, be patient
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment