Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 03-11-2009, 09:50 AM   #1
LQ Newbie
Registered: Mar 2009
Posts: 3

Rep: Reputation: 0
kill -3 to dump JAVA fault info?

Hi everyone. Does anyone have any information or a link that might help me with the kill -3 command. I have been googling for a while now with no luck.

In summary we have a JAVA application that pins the CPU and need to kill the process. I am hearing that kill -3 will dump fault information somewhere? My problem is that I do not know how to use -3 properly and figure out where the log is created.

Also, we do not have access to profiler tools at this time and top doesn't give us enough info. Figured some fault info would be useful.

Thanks everyone.

Old 03-11-2009, 11:53 AM   #2
Senior Member
Registered: Aug 2003
Location: Glasgow
Distribution: Fedora / Solaris
Posts: 3,109

Rep: Reputation: 96

'jstack' will cause a Java process to dump it's stack trace, which I'd imagine is probably what you're looking for.

If you really want a core file, check 'ulimit -c' - the value specified is the largest size of core file that can be dumped (in blocks).
Set it to something fairly big (e.g. 'ulimit -c 1000000'), then run your app (the ulimit will only affect programs run from the shell you set the ulimit in), then kill the app with 'kill -3' and you'll get a core file in the directory you launched the app from.

Old 03-11-2009, 12:58 PM   #3
LQ Newbie
Registered: Mar 2009
Posts: 3

Original Poster
Rep: Reputation: 0
Thanks for your help. t me go try this
Old 03-11-2009, 01:10 PM   #4
LQ Guru
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
Hi -

Jstack is definitely what you're looking for.

You also want to get JConsole - it will help you enormously.

You didn't say if this is a custom Java application, or a custom web app that's running under Tomcat or some application server. Application servers also have many tools you can use to diagnose the problem, and tunable parameters you can set to improve performance (if the problem isn't just an application bug).

Finally, it sounds like the process becomes CPU bound. But definitely pay attention to tools like "top" to make sure the root cause isn't swapping, or some other OS-level problem.



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
how to force a core-dump...segmentation fault johnpaulodonnell Programming 2 10-23-2008 06:05 AM
php core dump with segmentation fault ohcarol *BSD 9 10-14-2008 09:19 AM
core dump source info suhas7860 Linux - General 1 03-28-2007 07:08 AM
core dump source info suhas7860 Linux - Kernel 1 03-27-2007 06:13 AM
looking for a way to dump line number info jbreazeale Linux - Software 2 09-22-2004 12:02 PM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 09:35 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration