shell thread stack analysis

Java process to identify the above mentioned id 
PS the AUX | grep xxxxxx 

using the Print command jstack thread stack information 

jstack 7363 

java threads statistics 
jstack 7363 | grep java.lang.Thread.State: -c 
 
thread various state statistics 
jstack 7363 | grep java.lang. Thread.State: | Sort | the uniq -C 

     34 is java.lang.Thread.State: RUNNABLE 
      . 3 java.lang.Thread.State: TIMED_WAITING (ON Object Monitor) 
      . 8 java.lang.Thread.State: TIMED_WAITING (Parking) 
      . 9 Java .lang.Thread.State: TIMED_WAITING (Sleeping) 
      2 java.lang.Thread.State: the WAITING (ON Object Monitor) 
     73 is java.lang.Thread.State: the WAITING (Parking) 

the first column in descending order as a digital 

jstack 7363 | grep java.lang.Thread.State: | sort | uniq -c | sort -rn -k 1


     75    java.lang.Thread.State: WAITING (parking)
     34    java.lang.Thread.State: RUNNABLE
      9    java.lang.Thread.State: TIMED_WAITING (sleeping)
      8    java.lang.Thread.State: TIMED_WAITING (parking)
      3    java.lang.Thread.State: TIMED_WAITING (on object monitor)
      2    java.lang.Thread.State: WAITING (on object monitor)

Guess you like

Origin www.cnblogs.com/daomeidan/p/12483999.html