Solved

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

Posted on 2008-06-25
5
633 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
  • 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 500 total points
ID: 21879805
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…

828 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