2 Replies Latest reply on Apr 25, 2011 6:47 PM by jimyliu

    High CPU thread from the thread dump

    jimyliu

      Hi,

       

      We are using tomcat with JDK 1.6 on Linux. Is there anyway to find out which java thread is consuming more CPU than others in the thread dump file ?

      Thanks,

       

      Jimy

        • 1. High CPU thread from the thread dump
          peterj

          A JVM thread dump will tell you what each thread is doing at that point in time, it will not tell you how busy the threads have been. However, the thread dump does provide the operating system thread id (labelled "nid"), and you can use that to compare to the output of OS tools that provide thread usage (such as ps -m).

           

          Note that in a Java EE environment where the web or app server maintains a thread pool to work on requests that thread usage information probably does not mean all that much.

          • 2. High CPU thread from the thread dump
            jimyliu

            Hi Peter,

             

            Thanks for the suggestion.  Through your suggestion, I found high CPU thread. :-)

             

            Jimy