java进程号: 27405
1: ps p 27405 -L -o pcpu,pid,tid,time,tname,cmd
14.7 27405 27920 00:00:43 pts/1 /usr/java/jdk1.7.0_79/bin/java -Djava.util.logging.con....
找到消耗cpu最大的线程:27920 ==>16进制 6d10
2: jstack -l 27405 > j.log
查找6d10,看是什么原因:
"ContainerBackgroundProcessor[StandardEngine[Catalina]]" daemon prio=10 tid=0x00007f7abc09b800 nid=0x6d10 waiting on condition [0x00007f7ab509f000]
java.lang.Thread.State: TIMED_WAITING (sleeping)
at java.lang.Thread.sleep(Native Method)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1339)
at java.lang.Thread.run(Thread.java:745)