How to take memory snapshots at regular interval for jrockit?

183 Views Asked by At

We are running some heavy deployments on weblogic setup and it takes around an hour. During that time, we want to take a memory snapshots/heap dumps to see how much headroom we have wrt memory to avoid crash. Is there any optional jvm arg that we can provide while starting the server which will do the job? I checked below link but nothing is fitting the requirement - http://docs.oracle.com/cd/E15289_01/doc.40/e15062/optionxx.htm

1

There are 1 best solutions below

0
On BEST ANSWER

If acceptable to drive the snapshots from the outside then you can use jrcmd to send commands to your JVM.

To get the PID use

jrcmd -P

and then you can use

jrcmd PID hprofdump dumpfile.bin

See http://docs.oracle.com/cd/E15289_01/doc.40/e15062/diagnostic.htm#BABIACCC for hrpofdump and http://docs.oracle.com/cd/E15289_01/doc.40/e15061/ctrlbreakhndlr.htm#i1001760 for jrcmd.