This discussion is archived
1 Reply Latest reply: Jun 16, 2010 10:57 PM by 843798 RSS

Getting a native thread Id from JMX?

843798 Newbie
Currently Being Moderated
The Java thread id is available in the java.lang.management.ThreadInfo but there seems to be no way to get the nid for a Java thread - is there any way to do this from Java code?
  • 1. Re: Getting a native thread Id from JMX?
    843798 Newbie
    Currently Being Moderated
    Hi,

    Me too required the native thread id from JMX.

    Following are my use case,

    When CPU utilization of a m/c is too high due to a java application, I can get the exact problematic thread by using following command in linux,

    top -b -H -n1 -d1 | head -n 20

    The PID listed in the above command is directly mapped to native id. I can easily identify the problematic trace which causing high cpu by converting PID to HEX and match it in the thread dump. For easy debugging, I would like to high light the problematic thread trace which taken using JMX.

    Is there any way to get native ID from JMX ? or any other work around to get native ID....

    I greatly appreciate your help on the above requirement.

    Thanks,
    Ramesh