mirror of https://github.com/alibaba/arthas.git
Arthas thread 命令教程 (#1328)
parent
20762ef304
commit
75d5b15ad6
@ -0,0 +1,10 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
下载`arthas-demo.jar`,再用`java -jar`命令启动:
|
||||||
|
|
||||||
|
`wget https://alibaba.github.io/arthas/arthas-demo.jar
|
||||||
|
java -jar arthas-demo.jar`{{execute T1}}
|
||||||
|
|
||||||
|
`arthas-demo`是一个很简单的程序,它随机生成整数,再执行因式分解,把结果打印出来。如果生成的随机数是负数,则会打印提示信息。
|
@ -0,0 +1,11 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Download `arthas-demo.jar` and start with the `java -jar` command:
|
||||||
|
|
||||||
|
`wget https://alibaba.github.io/arthas/arthas-demo.jar
|
||||||
|
java -jar arthas-demo.jar`{{execute T1}}
|
||||||
|
|
||||||
|
`arthas-demo` is a very simple program that randomly generates integers, performs factorization, and prints the results.
|
||||||
|
If the generated random number is negative, a error message will be printed.
|
@ -0,0 +1,8 @@
|
|||||||
|
|
||||||
|
The `thread Tutorial` demonstrates the usage of thread. If you have more tips or questions, please feel free to ask in Issue.
|
||||||
|
|
||||||
|
* Issues: https://github.com/alibaba/arthas/issues
|
||||||
|
* Documentation: https://alibaba.github.io/arthas
|
||||||
|
|
||||||
|
|
||||||
|
If you are using Arthas, please let us know. Your use is very important to us: [View](https://github.com/alibaba/arthas/issues/111)
|
@ -0,0 +1,43 @@
|
|||||||
|
{
|
||||||
|
"title": "Arthas thread Command",
|
||||||
|
"description": "Arthas thread Command",
|
||||||
|
"difficulty": "master",
|
||||||
|
"time": "10-20 minutes",
|
||||||
|
"details": {
|
||||||
|
"steps": [
|
||||||
|
{
|
||||||
|
"title": "Arthas demo",
|
||||||
|
"text": "arthas-demo.md"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "Start arthas-boot",
|
||||||
|
"text": "arthas-boot.md"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "Thread Command",
|
||||||
|
"text": "thread.md"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "How the CPU ratios are calculated?",
|
||||||
|
"text": "CPU-ratios-calculate.md"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "Thread Usage",
|
||||||
|
"text": "thread-usage.md"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"intro": {
|
||||||
|
"text": "intro.md"
|
||||||
|
},
|
||||||
|
"finish": {
|
||||||
|
"text": "finish.md"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"environment": {
|
||||||
|
"uilayout": "terminal"
|
||||||
|
},
|
||||||
|
"backend": {
|
||||||
|
"imageid": "java",
|
||||||
|
"environmentsprotocol": "http"
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,14 @@
|
|||||||
|
|
||||||
|
|
||||||
|
## thread
|
||||||
|
|
||||||
|
Check the basic info and stack trace of the target thread.
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
| Name | Specification |
|
||||||
|
| ---- | ---- |
|
||||||
|
| id | thread id in JVM |
|
||||||
|
| [n:] | the top n busiest threads with stack traces printed |
|
||||||
|
| [b] | locate the thread blocking the others |
|
||||||
|
| [i <value>] | specify the interval to collect data to compute CPU ratios (ms) |
|
Loading…
Reference in New Issue