You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
arthas/tutorials/katacoda/case-thread-cn/case-thread.md

31 lines
545 B
Markdown

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

### 查看所有线程信息
`thread`{{execute T2}}
### 查看具体线程的栈
查看线程ID 16的栈
`thread 16`{{execute T2}}
### 查看CPU使用率top n线程的栈
参数`n`用来指定最忙的前N个线程并打印堆栈
`thread -n 3`{{execute T2}}
参数`i`用来指定cpu占比统计的采样间隔单位为毫秒
查看5秒内的CPU使用率top n线程栈
`thread -n 3 -i 5000`{{execute T2}}
### 查找线程是否有阻塞
参数`b`用来指定找出当前阻塞其他线程的线程
`thread -b`{{execute T2}}