javajvmrmiheap-dump

Can I get heap dump of a java process from a remote server without jdk installed?


I have a server with JRE, I need to get heap dump, without hanging application, is there a way to do this?


Solution

  • jattach utility can do that.
    It works without JDK installed.

    jattach <pid> dumpheap /path/to/dump.hprof
    

    Note: JVM will be paused while dumping the heap. As soon as the dump is completed, application will resume.