Kill -3 <pid> to get thread dump is not working in solaris

Hi,

I just want to take the thread dump of Analytic Engine and for that i’m using kill -3 command in Solaris box. But it doesn’t seems Generating the thread dumps in nohup.out file and the file is empty.

I even tried redirecting the output to threaddump.txt(kill -3 > threaddumps.txt
) file, and the command creates the file named ‘threaddumps.txt’ but then again the file is empty.

Can anybody help me to get this done, please ?

Thanks
RamGopal

Are you sure using the right PID?..did you check with grep process available?

Please recheck it:

HTH,
RMG

Hi RMG,

Thanks for your reply.

Yeah, i’m sure that i’m using the right to get the threaddump and the process is running.

wmadmin 9612 1 0 Sep 24 ? 0:00 /bin/sh /opt/webMethods/7.1.2/PPT01a/IntegrationServer/bin/server.sh -port 1512

wmadmin@stevux1217:/opt/webmethods/7.1.2/PPT01a: kill -3 9612 > /opt/webMethods/7.1.2/PPT01a/threaddumps.txt

This is for IS threaddump and IS is running at 9612.The Kill -3 9612 command,creates a file named threaddumps.txt but it’s empty.

I’m really surprised as the basic command kill -3 is not working in our Environment.
Please let me know, if i need to look for some other files to get the threaddump.
Is there any other way to get threaddump in solaris?
Thanks in advance.

Thanks
Ram

kill -3 PID should generate javacore file…

Not sure what is missing in your environment.

Did you check with sysadmin any .profile need to setup on Oracle Solaris?

HTH,
RMG

Hi rmg,

Thanks for your help and i just have found the alternate way to get take threaddump in solaris.

We will have to use jps and jstack tool for this approach.

wmadmin@stevux1218:/opt/webmethods/8.2/<ENV>/jvm/jvm160/bin: /opt/webMethods/8.2//jvm/jvm160/bin/jps -lm
jps tool will list all the running Components and it’s pid. To take the threaddump of the particular instance use jstack with the pid taken from jps.
wmadmin@stevux1218:/opt/webmethods/8.2/<ENV>/jvm/jvm160/bin: ./jstack 17879 > /opt/webMethods/8.2//threaddumps.txt

Regards
RamGopal

In your first thread, it was mentioned that, you need to take thread dump for Analytic engine… but the process that was listed from your grep is not AE… It is IS…

Issue the command as below…

ps -es | grep analysis

You should see an entries like below…

webmadmn 19949 1 0 Dec18 ? 00:00:00 /opt/softwareag/optimize/…/common/bin/wrapper -c /opt/softwareag/optimize/analysis/conf/wrapper.conf
webmadmn 20136 19949 0 Dec18 ? 01:12:48 /opt/softwareag/jvm/jvm160/bin/java -server -Doptimize.

In fact, you would see two entries… one for AE and another for its corresponding wrapper.conf… In case if you would like to kill the running AE, you have to issue kill -9 command for both the process ids…

Make sure you are passing the right value of process id’s as you might be referring to threaddump of IS thinking it is AE…

HTH
Senthil

Hi Senthil,

Thanks for this.

And i know that i have mentioned the process to take the thread dump of IS as shown in my example. But i just wanted to let others know that we can also use jstack tool to get thread dumps. In my case kill -3 was not working so, just for an example i have taken the thread dump of IS with the help of jps and jstack.

And ps -ef | grep optimize gave me the and i have passed that to jstack to get AE threaddump.

Regards
RamGopal

Ok. Two more points to check with Solaris admin team for this to work…

  1. Server should be started with nohup like below
    a. nohup ./server.sh & (or)
    b. ./startup.sh (which starts with nohup file).

In both the cases kill -3 will write the thread dumps into the nohup file. If server is not started with nohup, it goes into a different place to write the threaddump but I am not sure about the location.

  1. Check with your Solaris admin why kill -3 did not create the threaddump.

-Senthil

So is this command not generating javacore dumps at all?

kill -3

That’s right rmg ! Kill -3 is not working in my Environment.

That is strange…did you touch based with your SUN OS sysadmin by chance?

Any inputs from them on the environment wise?

Are you expecting for java core dumps or heap dumps?

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.