java problem diagnosis

 

 jstack 9638|grep tid|wc -l Count the number of threads of tomcat

 jstack 9630 > tomcat.thread print thread stack

 jstat -gcutil 9638 1000 gc status

 jmap -heap 9638 heap space

 jmap -histo 9630 number of objects

 jmap -dump:format=b,file=tomcat.dump 9630 dump files everywhere

 jhat -J-mx1024m -port 3030 tomcat.dump View dump file

 iostat -x 1 View system io status

 

The top 5 threads of the best cpu of the process

 ps H -p 1120 eo tid,time,%cpu | sed '1d' |awk '{print $1,$2,$3}'|sort -rn -k +3|head -n 5

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326802992&siteId=291194637