1 Reply Latest reply: Jun 17, 2010 12:57 AM by 843798 RSS

    Getting a native thread Id from JMX?

      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?

          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.