打开top,按shift+H。帮助文档说明:
-H : Threads toggle
Starts top with the last remembered 'H' state reversed. When
this toggle is On, all individual threads will be displayed.
Otherwise, top displays a summation of all threads in a
process.
就可以找出最耗cpu的线程pid,例如1688,对应十六进制是698。
再用jstack dump一下。找出nid是698的线程,这条线程就是你要找的线程了。
[color=white]作者:翁志艺[/color]
-H : Threads toggle
Starts top with the last remembered 'H' state reversed. When
this toggle is On, all individual threads will be displayed.
Otherwise, top displays a summation of all threads in a
process.
就可以找出最耗cpu的线程pid,例如1688,对应十六进制是698。
再用jstack dump一下。找出nid是698的线程,这条线程就是你要找的线程了。
[color=white]作者:翁志艺[/color]