Java Threads Tracing on Linux

Posted on 2006-03-20
Medium Priority
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???

Question by:louai
  • 2
  • 2
LVL 86

Accepted Solution

CEHJ earned 68 total points
ID: 16235790
>>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
LVL 30

Assisted Solution

by:Mayank S
Mayank S earned 66 total points
ID: 16235826
Are you using many threads in the program? Is it possible for you to use a thread-pool?
LVL 24

Assisted Solution

sciuriware earned 66 total points
ID: 16236499
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.

LVL 86

Expert Comment

ID: 16250915
LVL 30

Expert Comment

by:Mayank S
ID: 16254320
So what was the solution?

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
Suggested Courses
Course of the Month16 days, 23 hours left to enroll

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question