Operating System - HP-UX
1751978 Members
4527 Online
108784 Solutions
New Discussion юеВ

Re: Killing a process by kill -3; Will it impact running production process ?

 
Shivkumar
Super Advisor

Killing a process by kill -3; Will it impact running production process ?

Hello,

We have WebLogic 9.2 running on HPUX.
It has a weblogic domain running 4 instances in production.

We want to take thread dump by using "kill -3 java process id".
I had read somewhere that killing a process by "kill -3 java pid" stops the java process for a moment and probably might impact production applicaton.

My question is: Should we avoid taking thread dump by killing the process ?

What is other best option ?

Thanks,
Shiv

7 REPLIES 7
James R. Ferguson
Acclaimed Contributor

Re: Killing a process by kill -3; Will it impact running production process ?

Hi Shiv:

A 'kill -3' is otherwise known as a 'kill -QUIT'. Whether or not the process receiving this signal is written to handle it will determine what happens when you send the signal. By default, this will terminate a process.

If you want a core dump of the process, use:

# kill -6

...which is:

# kill -ABRT

Regards!

...JRF...
Shivkumar
Super Advisor

Re: Killing a process by kill -3; Will it impact running production process ?

I want to take thread dump of java process. Are core dump different than thread dump ? Looks like core dump is binary file and needs some debugger tool to analyze.
James R. Ferguson
Acclaimed Contributor

Re: Killing a process by kill -3; Will it impact running production process ?

Hi (again) Shiv:

> Looks like core dump is binary file and needs some debugger tool to analyze.

Yes, that is correct. If you take a core dump, the idea is that either you or someone else wants to analyze it.

http://docs.hp.com/en/JAVADEVTOOLS/sdk.html

Regards!

...JRF...
Dennis Handly
Acclaimed Contributor

Re: Killing a process by kill -3; Will it impact running production process ?

>Should we avoid taking thread dump by killing the process? What is other best option?

If you want a thread dump, that kill -QUIT is what you need to do.
Why do you need that thread dump? Something hanging? You need to monitor performance?

Here are some threads, including and old one of yours:
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1068780
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1017367
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=945279
http://docs.hp.com/en/5992-1918/ch01s02.html
http://docs.hp.com/en/5992-1918/ch01s01.html

>I want to take thread dump of java process. Are core dump different than thread dump?

You already asked that 3+ years ago.

>JRF: If you take a core dump, the idea is that either you or someone else wants to analyze it.

Right. You could also use gdb. There are ways to have it at least dump the java frames.
Shivkumar
Super Advisor

Re: Killing a process by kill -3; Will it impact running production process ?

My question was:

I had read somewhere that killing a process by "kill -3 java pid" stops the java process for a moment and probably might impact production applicaton.

Will thread impact running production environment ?

Thanks,
Shiv
Dennis Handly
Acclaimed Contributor

Re: Killing a process by kill -3; Will it impact running production process ?

>stops the java process for a moment and probably might impact production application.

This seems reasonable.

>Will thread impact running production environment?

It depends. If you have a timeout set so low that you exceed it, you may get errors.

If you have any more questions about Java and you have a support contract, you'll need to contact the Response Center.

One more URL, Java Troubleshooting Guide for HP-UX Systems:
http://h18012.www1.hp.com/java/support/JTGv2.pdf
bright image
Frequent Advisor

Re: Killing a process by kill -3; Will it impact running production process ?

If you wish you can perform a thread dump from the weblogic 9.2 admin console.

In the weblogic admin console, Select a weblogic server, click on monitoring, click on threads and then dump thread stacks.

If you need more information on this you should go the the BEA website and look at the weblogic documentation.

http://edocs.bea.com/common/docs92/index.html