Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

How to relate the nid in Java Thread dump with pstack output?

Posted on 2008-06-25
5
Medium Priority
?
662 Views
Last Modified: 2012-06-27
Hi,
I'm confusing on How to relate the nid in Java thread dump with pstack putput.
I need to find which Thread consuming CPU much.so got information by executing command:prstat -L
but when i look at thread dump , each thread  has nid value. but output of prstat -L has lwp id(which is in decimal)
I heard we can get the nid information pstack. but i could not able to find out from pstack.

Please let if anybody have on this or any other alternative ways..

basically I need to figaure out what thread is doing..(which is consuming high COU usage)
Thanks.

"Thread-598" daemon prio=10 tid=0x01b48410 nid=0x3f2 runnable [0x7a581000..0x7a581988]
        at java.net.SocketInputStream.socketRead0(Native Method)
        at java.net.SocketInputStream.read(SocketInputStream.java:129)
        at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
        at java.io.BufferedInputStream.read(BufferedInputStream.java:235)
        - locked <0xc32f18a8> (a java.io.BufferedInputStream)
        at java.io.FilterInputStream.read(FilterInputStream.java:66)
        at java.io.PushbackInputStream.read(PushbackInputStream.java:120)
        at org.apache.commons.net.io.FromNetASCIIInputStream.__read(FromNetASCIIInputStream.java:114)
        at org.apache.commons.net.io.FromNetASCIIInputStream.read(FromNetASCIIInputStream.java:209)
        at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
        at java.io.BufferedInputStream.read(BufferedInputStream.java:235)
        - locked <0xc32fbff0> (a org.apache.commons.net.telnet.TelnetInputStream)
        at org.apache.commons.net.telnet.TelnetInputStream.__read(TelnetInputStream.java:140)
        at org.apache.commons.net.telnet.TelnetInputStream.run(TelnetInputStream.java:464)
        at java.lang.Thread.run(Thread.java:595)

-----------------  lwp# 12 / thread# 11  --------------------
 ff31f8bc lwp_sema_wait (8be81e60)
 ff3696f4 _park    (8be81e60, ff38c000, 0, 8be81d98, 19abba0, 0) + 114
 ff3690f0 _swtch   (8be81d98, ffffffff, ff38c000, 5, 1000, fe435d20) + 158
 ff36c888 sema_wait (fe4408e8, ff397864, 5000, 10000, 534d, 1) + bc
 fdf5f170 __1cVcheck_pending_signals6Fi_i_ (1, fe431098, fe430f80, 159da8, fe3dc000, a) + 254
 fdf56430 __1cTsignal_thread_entry6FpnKJavaThread_pnGThread__v_ (9c00, 159da8, 7c00, fe3dc000, 8be81a88, 8be81aac) + 2e4
 fdedb8c8 __1cKJavaThreadDrun6M_v_ (159da8, fe435020, 781c, 0, 7800, 9400) + 2b0
 fe27ced8 __1cG_start6Fpv_0_ (159da8, 5277, fe3dc000, 0, 5874, 5800) + 208
 ff37b11c _thread_start (159da8, 0, 0, 0, 0, 0) + 40
0
Comment
Question by:java_tes
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
5 Comments
 
LVL 92

Expert Comment

by:objects
ID: 21871569
don't think you can, that nid is just an address, not the actual id.

0
 

Author Comment

by:java_tes
ID: 21878248
could you please tell me how to know which thread is consuming more CPU and what it is doing?
0
 
LVL 92

Accepted Solution

by:
objects earned 2000 total points
ID: 21879805
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

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…
In this post we will learn different types of Android Layout and some basics of an Android App.
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
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

618 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