How to change thread dump file path of IS on HP-UX

Hi,

One of our customer is using IS6.5 on HP-UX.
They are taking thread dump by

  1. Setting “-XX:HeapDump” to “server.sh” or
  2. “export _JAVA__JAVA_HEAPDUMP_ONLY=1” before IS6.5 starts.

By these settings, the tread dump file is stored in .

If you know how to change the file path of the thread dump file of IS,
please sincerely tell.

Best regards,
Shotat

Hi Shogo,

we are using the following approach to start our IntegrationServers:


        if [ -f nohup.akt ]
        then
          rm nohup.out
        fi
        ## Start IS
        echo "Start IS $IS_ROOT"
        nohup ./server.sh 1> nohup.out 2>&1 &

By doing so the thread dumps will go nohup.out.

Thread Dumps are taken by the following command sequence:

  • ps -ex|grep java
  • Note the PID of the IntegrationServer Java Process
  • kill -3

Regards,
Holger

Dear Holger-san,

Thanks for your support very much!
I just confirmed the script and found it worked on My IS9.6 on Cent OS6.2.
I am asking the customer if that works with IS6.5 on HP-UX.

If there are any question regarding this issue, please sincerely let me ask.

p.s.
The following file name is only typo for “nohup.out”?
if [ -f nohup.akt ]

Best regards,
Shotat

Hi Shogo,

thanks for pointing this out.

Yes, this is a typo.

This is only a snippet from my Shell script.
We are using nohup_timestamp.pid as the standard filename and nohup.akt is a softlink to the current one.

This was just meant as a sample, you can name the file whatever you want.

$IS_ROOT is a variable pointing to the installation directory of IS.

Regards,
Holger

Are you interested in thread dumps or heap dumps? Your post says thread dump but the lines you pasted are for heap dumps.

If you’re interested in changing where the heap dump gets generated when setting the JVM option -XX:+HeapDumpOnOutOfMemoryError, then use the option -XX:HeapDumpPath.

http://www.oracle.com/technetwork/java/javase/clopts-139448.html#gbzrr

Percio

Dear Percio-san,

Thanks for the useful information and url very much.

http://www.oracle.com/technetwork/java/javase/clopts-139448.html#gbzrr

I had found the information of P48 of the url below for “HP-UX Java tool” which is slightly
different (extended) from the standard java.
http://h20565.www2.hpe.com/hpsc/doc/public/display?sp4ts.oid=4268160&docId=emr_na-c02591670&docLocale=en_US

From this, when “-XX:+HeadDump” is specified, it does not seem that the file path
of the heapdump file can be changed.

I would appreciate your idea for this.

(Our customer is agreeing with the thread dump steps of Holger-san as the alternative.)

Best regards,
Shogo Tatsuzawa"

Hi,

please note that these “-XX”-options are not standardized and can have silghtly different behaviours on different OS/Java-Versions (if they exist at all).

Regards,
Holger

A thread dump is not an alternative to a heap dump. They are two completely different things.

Percio

Dear Percio-san, Holger-san

A thread dump is not an alternative to a heap dump. They are two completely different things.
As Percio-san said, I understand heap dump is different from thread dump.

The customer still want to know the way to store Heapdump file of IS6.5 in large directory.

If you know the Integration Server standard way (not HP-UX specific) to obtain
Heapdump file in any directory, please sincerely tell.

Best regards,
Shotat

Dear Percio-san, Holger-san

https://javaworks.wordpress.com/2009/12/03/jvm-heap-dumps-generation-and-analysis/

As the url above, “jmap” command seems to be one of the way to obtain the heapdump file.

-Till java 1.5, it seems to be UNABLE to specify the directory to save the heapdump file.
-From java 1.6 it seems to be ABLE to specify the the directory to save the heapdump file.

Please sincerely provide with your thought.

Best regards,
Shotat

Yes, jmap is the way to go.

Dear Percio-san,

Yes, jmap is the way to go.

Thanks for the reply very much.

Best regards,
Shotat