Skip to main content

alphaWorks  >  Forums  >  HeapRoots  >  developerWorks

Heap Dump Location    Point your RSS reader here for a feed of the latest messages in this thread


     

 
 

My developerWorks
 Welcome, Guest
Sign in or register
This question is answered.

Permlink Replies: 2 - Pages: 1 - Last Post: Jul 22, 2009 8:37 AM Last Post By: trayott Threads: [ Previous | Next ]
trayott

Posts: 2
Registered: Jul 16, 2009 11:08:30 AM
Heap Dump Location
Posted: Jul 16, 2009 11:29:07 AM
 
Click to report abuse...   Click to reply to this thread Reply
The problem We're having is trying to change the default location of the heap dumps when calling them from within a servlet.

We're running WAS 6.1.0.23 on zOS and have a servlet deployed which allows calls to com.ibm.jvm.Dump.HeapDump(). By default these dumps which are generated go to /tmp.

We've created an HSF and mounted it as /u/dumps. Within WAS we first set IBM_HEAPDUMPDIR at the Environment > WebSphere Variables area (with a scope of node). That didn't work (still going to /tmp).

After doing some research we changed the location to set the variable to Servers > Application Servers > "server_name" > Java and Process Management > Process Definition > Environment Entries. Still no luck as they're being written to /tmp.

If anyone has suggestions on how we can change the locations of the dump files (the javacore files are also going to /tmp) that would greatly help. If our /tmp gets filled up then bad things start to happen.
Ben Hardill

Posts: 578
Registered: Dec 02, 2004 09:25:48 AM
Re: Heap Dump Location
Posted: Jul 18, 2009 11:46:56 AM   in response to: trayott in response to: trayott's post
 
Click to report abuse...   Click to reply to this thread Reply
Hi,

For Java 5.0 (as used under WAS 6.1) heapdumps will be created by default in the following order of preference

1) The location specified by the IBM_HEAPDUMP environment variable
2) The current working directory of the process (by default the profile dir of the App Server)
3) The location secified by the TMPDIR environment variable
4) /tmp

The important distinction for 1) and 3) is that this is an environment variable not a system property or WebSphere Variable and can only be set on the individual JVM level.

An easier way to set the location for Java 5.0 and 6.0 is to use the -Xdump JVM command line option. To set the default location for all heapdump use the following:

-Xdump:heap:defaults:file=/path/to/store/heapdump.%Y%m%d.%H%M%S.%pid.phd

This should be appended to the "Generic JVM args" section in the WAS Admin Console.

Ben Hardill

trayott

Posts: 2
Registered: Jul 16, 2009 11:08:30 AM
Re: Heap Dump Location
Posted: Jul 22, 2009 08:37:37 AM   in response to: Ben Hardill in response to: Ben Hardill's post
 
Click to report abuse...   Click to reply to this thread Reply
Thanks. That worked fine. I also found additional information at the following location:

http://publib.boulder.ibm.com/infocenter/javasdk/v5r0/index.jsp?topic=/com.ibm.java.doc.diagnostics.50/html/dumpagents_options.html

Point your RSS reader here for a feed of the latest messages in all forums