How to get heap dump from a remote server jvm?

Srisfti picture Srisfti · Dec 29, 2014 · Viewed 10.2k times · Source

How can I get aheap dump from a remote JVM which runs on linux with WL application server?

When I run locally on a windows machine I know how to get a dump. But, how do I get a dump from the user acceptance test server? Thanks in advance.

Answer

Dror Bereznitsky picture Dror Bereznitsky · Dec 30, 2014

You can use JMX to connect to the remote application server (it should be enabled in advance) and use the HotSpotDiagnostic MBean which allows taking a heap dump.
You can use JConsole or JVisualVM for invoking the MBean operation.
This post by Mike Haller describes how to use this method with JVisualVM.