0

How can I capture a Core Dump and analyze the Java heap on an application running in Apache Tomcat?

cmd
  • 11,622
  • 7
  • 51
  • 61
emdhie
  • 379
  • 1
  • 3
  • 10
  • possible duplicate of [How to get a thread and heap dump of a Java process on Windows that's not running in a console](http://stackoverflow.com/questions/407612/how-to-get-a-thread-and-heap-dump-of-a-java-process-on-windows-thats-not-runnin) – flup Nov 28 '13 at 06:52

2 Answers2

2

A javacore can be provoked manually (assuming the JVM is configured to dump at user signal - generally it is).

  • On Windows: Press ControlBreak on the command window to generate the dumps.
  • On Linux: Press Control\ on the shell window.
  • On *nix or using Cygwin: kill -quit <pid>

All in all, launch Tomcat from a console, then depending on your platform perform one of the options above. This will generate a javacore which can be analyze with various tools e.g. Visual VM, etc.

cmd
  • 11,622
  • 7
  • 51
  • 61
1

VisualVM provide wide range of memory test on any application running with Java. I don't have much idea about tomcat memory analyzer but I'd prefer VisualVM

Download: https://visualvm.java.net/

VisualVM is a visual tool integrating several commandline JDK tools and lightweight profiling capabilities. Designed for both production and development time use, it further enhances the capability of monitoring and performance analysis for the Java SE platform

Screenshot of heap dump.

enter image description here

Vicky Thakor
  • 3,847
  • 7
  • 42
  • 67