关于java:Jstack定位CPU过高问题

  1. 定位过程,top
  2. 定位线程,top -Hp 过程号,获取线程号,H代表Thread
  3. 将线程号转换为16进制,printf “%x\n” PID
  4. 获取异样代码堆栈,jstack 过程PID | grep 16进制异样线程号 -A 90,-A 90指输入90行

tid, Java memory address of its internal Thread control structure.

nid, native thread id. 每一个nid对应于linux下的一个tid, 即lwp (light weight process, or thread)

评论

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

这个站点使用 Akismet 来减少垃圾评论。了解你的评论数据如何被处理