mirror of https://github.com/alibaba/arthas.git
add docs for basic commands (#1804)
parent
aa94a3b36c
commit
57259ec3ed
@ -0,0 +1,7 @@
|
|||||||
|
cls
|
||||||
|
===
|
||||||
|
|
||||||
|
clear current console.
|
||||||
|
|
||||||
|
> if not in tty mode,it will warn "Command 'cls' is only support tty session.".
|
||||||
|
|
@ -0,0 +1,87 @@
|
|||||||
|
help
|
||||||
|
===
|
||||||
|
|
||||||
|
show help message, the command can show all the commands that current Arthas server supports,or you can use the command to show the detail usage of another command.
|
||||||
|
|
||||||
|
> [help command] equals [command -help],both is to show the detail usage of one command.
|
||||||
|
|
||||||
|
### Options
|
||||||
|
|
||||||
|
| Name | Specification |
|
||||||
|
| ------: | :-------------------------------------------------------- |
|
||||||
|
| | show all the commands that current Arthas server supports |
|
||||||
|
| [name:] | show the detail usage of one command |
|
||||||
|
|
||||||
|
### Usage
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ help
|
||||||
|
NAME DESCRIPTION
|
||||||
|
help Display Arthas Help
|
||||||
|
auth Authenticates the current session
|
||||||
|
keymap Display all the available keymap for the specified connection.
|
||||||
|
sc Search all the classes loaded by JVM
|
||||||
|
sm Search the method of classes loaded by JVM
|
||||||
|
classloader Show classloader info
|
||||||
|
jad Decompile class
|
||||||
|
getstatic Show the static field of a class
|
||||||
|
monitor Monitor method execution statistics, e.g. total/success/failure count, average rt, fail rate, etc.
|
||||||
|
stack Display the stack trace for the specified class and method
|
||||||
|
thread Display thread info, thread stack
|
||||||
|
trace Trace the execution time of specified method invocation.
|
||||||
|
watch Display the input/output parameter, return object, and thrown exception of specified method invocation
|
||||||
|
tt Time Tunnel
|
||||||
|
jvm Display the target JVM information
|
||||||
|
perfcounter Display the perf counter information.
|
||||||
|
ognl Execute ognl expression.
|
||||||
|
mc Memory compiler, compiles java files into bytecode and class files in memory.
|
||||||
|
redefine Redefine classes. @see Instrumentation#redefineClasses(ClassDefinition...)
|
||||||
|
retransform Retransform classes. @see Instrumentation#retransformClasses(Class...)
|
||||||
|
dashboard Overview of target jvm's thread, memory, gc, vm, tomcat info.
|
||||||
|
dump Dump class byte array from JVM
|
||||||
|
heapdump Heap dump
|
||||||
|
options View and change various Arthas options
|
||||||
|
cls Clear the screen
|
||||||
|
reset Reset all the enhanced classes
|
||||||
|
version Display Arthas version
|
||||||
|
session Display current session information
|
||||||
|
sysprop Display, and change the system properties.
|
||||||
|
sysenv Display the system env.
|
||||||
|
vmoption Display, and update the vm diagnostic options.
|
||||||
|
logger Print logger info, and update the logger level
|
||||||
|
history Display command history
|
||||||
|
cat Concatenate and print files
|
||||||
|
base64 Encode and decode using Base64 representation
|
||||||
|
echo write arguments to the standard output
|
||||||
|
pwd Return working directory name
|
||||||
|
mbean Display the mbean information
|
||||||
|
grep grep command for pipes.
|
||||||
|
tee tee command for pipes.
|
||||||
|
profiler Async Profiler. https://github.com/jvm-profiling-tools/async-profiler
|
||||||
|
stop Stop/Shutdown Arthas server and exit the console.
|
||||||
|
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ help dashboard
|
||||||
|
USAGE:
|
||||||
|
dashboard [-h] [-i <value>] [-n <value>]
|
||||||
|
|
||||||
|
SUMMARY:
|
||||||
|
Overview of target jvm's thread, memory, gc, vm, tomcat info.
|
||||||
|
|
||||||
|
EXAMPLES:
|
||||||
|
dashboard
|
||||||
|
dashboard -n 10
|
||||||
|
dashboard -i 2000
|
||||||
|
|
||||||
|
WIKI:
|
||||||
|
https://arthas.aliyun.com/doc/dashboard
|
||||||
|
|
||||||
|
OPTIONS:
|
||||||
|
-h, --help this help
|
||||||
|
-i, --interval <value> The interval (in ms) between two executions, default is 5000 ms.
|
||||||
|
-n, --number-of-execution <value> The number of times this command will be executed.
|
||||||
|
```
|
||||||
|
|
@ -0,0 +1,31 @@
|
|||||||
|
history
|
||||||
|
===
|
||||||
|
|
||||||
|
view command history.
|
||||||
|
|
||||||
|
> history of commands will persisted in a file named history, so the history command can show all the history commands of current Arthas server ,but not only history in current session.
|
||||||
|
|
||||||
|
### Options
|
||||||
|
|
||||||
|
| Name | Specification |
|
||||||
|
| ---: | :----------------------------- |
|
||||||
|
| [c:] | clear all the history commands |
|
||||||
|
| [n:] | view the nearest 5 commands |
|
||||||
|
|
||||||
|
### 使用参考
|
||||||
|
|
||||||
|
```bash
|
||||||
|
#view the nearest 3 commands
|
||||||
|
$ history 3
|
||||||
|
269 thread
|
||||||
|
270 cls
|
||||||
|
271 history 3
|
||||||
|
```
|
||||||
|
|
||||||
|
```bash
|
||||||
|
#clear all the history commands
|
||||||
|
$ history -c
|
||||||
|
$ history 3
|
||||||
|
1 history 3
|
||||||
|
```
|
||||||
|
|
@ -0,0 +1,7 @@
|
|||||||
|
quit
|
||||||
|
===
|
||||||
|
|
||||||
|
exit the current Arthas client without affecting other clients. equals **exit**、**logout**、**q** command.
|
||||||
|
|
||||||
|
> just exit Arthas client,it means Arthas server is not closed,so the changes you do will not be reseted.
|
||||||
|
|
@ -0,0 +1,7 @@
|
|||||||
|
Stop
|
||||||
|
===
|
||||||
|
|
||||||
|
terminates the Arthas server, all the Arthas clients connecting to this server will be disconnected.
|
||||||
|
|
||||||
|
> the class redefined by redefine command will not be reset.
|
||||||
|
|
@ -0,0 +1,12 @@
|
|||||||
|
version
|
||||||
|
===
|
||||||
|
|
||||||
|
prints out Arthas's version.
|
||||||
|
|
||||||
|
### Usage
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ version
|
||||||
|
3.5.1
|
||||||
|
```
|
||||||
|
|
@ -0,0 +1,12 @@
|
|||||||
|
version
|
||||||
|
===
|
||||||
|
|
||||||
|
输出当前目标 Java 进程所加载的 Arthas 版本号
|
||||||
|
|
||||||
|
### 使用参考
|
||||||
|
|
||||||
|
```
|
||||||
|
$ version
|
||||||
|
3.5.1
|
||||||
|
```
|
||||||
|
|
Loading…
Reference in New Issue