DEV Community

Discussion on: JVM memory leak, where to begin?

Collapse
 
waitamiwrong profile image
rabbie • Edited

You can use a profiler to inspect the JVM at run time.

  1. jmap is a free basic CLI tool you can use to inspect a JVM. You can dump the heap, monitor live heap memory and get a simple histogram of objects using this tool.

  2. jconsole is an upgrade to jmap with a GUI and more options.

  3. VisualVM is a great free tool with way more options.

All the above tools are shipped free with a JDK distribution. You can find all of them in <JDK>/bin directory.

  1. Also, you can use something heavyweight, like JProfiler as well.

You can use all these tools to connect to a running JVM and inspect the internals.

Collapse
 
jouo profile image
Jashua

I'm checking out those as we speak, thank you very much!