Solved

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

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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
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:
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.

726 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