Table of ContentsPrerequisite
Top intro
Use top to find the thread information
Prerequisite
系统负载(system load)
系统负载(System Load)是系统CPU繁忙程度的度量,即有多少进程在等待被CPU调度(进程等待队列的长度)。
平均负载(Load average)
load average: 0.52, 0.27, 0.25
Load average 表示系统的cpu的平均的负载
平均负载(Load Average)是一段时间内系统的平均负载,这个一段时间一般取1分钟、5分钟、15分钟。
Pwdx (显示进程的当前工作目录)
pwdx - report current working directory of a process
pwdx
Vim+/{pat} For the first file the cursor will be positioned on the first occurrence of {pat}. See ":help search-pattern" for the available search patterns. - The file to edit is read from stdin. Commands are read from stderr, which should be a TTY.
jstack
jstack 15400 | vim +/0x3c2a -
表示直接从进程15400产生的线程stack信息, 去定位线程id是0x3c2a的线程栈信息
Top intro
实时显示系统的进程占CPU的情况, 或者是实时显示系统的负载情况
Use top to find the thread informationtop (find the pid which has the largest cpu usage)
top -Hp (find the thread id )
Prinf "0x%x\n"
jstack | vim +/ -