We help IT Professionals succeed at work.

Java Threads Tracing on Linux

louai
louai asked
on
Medium Priority
242 Views
Last Modified: 2010-03-31
Hi all,

I am running multi-threaded java program on linux, and after running for a while it is killed by the OS or hangs.

when I display the processes I got so many processes with the command line I used to run the program "java Server". I can see that one process that caused the crash is in "R" state for (Runnable in linux words).

is there a way to display the processes and there corresponding threads by class name, through Linux pr JVM???

Thanks
Comment
Watch Question

CERTIFIED EXPERT
Top Expert 2016
Commented:
>>Is there a way to display the processes and there corresponding threads by class name, through Linux pr JVM???

No. The best way is to implement a proper logging strategy, followed by running in a debugger

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
Mayank SPrincipal Technologist
CERTIFIED EXPERT
Commented:
Are you using many threads in the program? Is it possible for you to use a thread-pool?
You could make use of ECLIPSE and put breakpoints in multiple critical zones of threads,
but you just can't monitor more than one thread at a time.

;JOOP!
CERTIFIED EXPERT
Top Expert 2016

Commented:
:-)
Mayank SPrincipal Technologist
CERTIFIED EXPERT

Commented:
So what was the solution?
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.