Solved

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

Posted on 2008-06-25
5
621 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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
matchUp  challenge 9 71
array220 challenge 8 46
topping2 challenge 13 59
HashMap Vs TreeMap 12 49
For customizing the look of your lightweight component and making it look opaque like it was made of plastic.  This tip assumes your component to be of rectangular shape and completely opaque.   (CODE)
An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

706 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now