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行

image.png

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

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

相关文章
相关标签/搜索