How can I create a bunch of heaps with only JRE?

We have a JRE installed in our production environment, but not a JDK. Below are the versions of JRE and OS.

[me@mymachine ~]$ java -version java version "1.6.0_45" Java(TM) SE Runtime Environment (build 1.6.0_45-b06) Java HotSpot(TM) 64-Bit Server VM (build 20.45-b01, mixed mode) [me@mymachine ~]$ uname -a Linux mymachine.mydomain.com 3.10.35-43.137.amzn1.x86_64 #1 SMP Wed Apr 2 09:36:59 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux 

It does not look as if the jmap tool was present anywhere on the system and without root access, I could not install it anywhere on the system. What can I do to get a bunch of heaps (i.e. create a .hprof file)?

In addition, we use JBoss 7.1.3.AS, if that matters.

+8
java heap-dump
source share
2 answers

Built-in tools like jmap , jconsole and jvisualvm are only available in the JDK. Another option is to add the VM argument -XX:+HeapDumpOnOutOfMemoryError , which tells the JVM to automatically generate a heap dump when OutOfMemoryError occurs, and the -XX:HeapDumpPath argument to specify the path for the heap dump.

If you cannot upgrade the JRE to use tools such as those on the JRE 7 server ( http://www.oracle.com/technetwork/java/javase/downloads/server-jre7-downloads-1931105.html ), You may need to consider third-party profiling tools such as JProfiler or a list of them here .

+7
source share

The only way seems to be to pin your local SDK6 and put it somewhere on the server. Then open the remote console and unload the JRE from the bin directory of this SDK.

If your client forbids downloading executable files, you are of course out of luck.

0
source share

All Articles