update doc

This commit is contained in:
hengyunabc committed 2018-09-26 18:53:51 +08:00
1 parent 80f17a7b0b
commit 0f61306efb
42 files changed
+1173 -75

No files matched your search

+7 -7
View File
@@ -3,13 +3,13 @@ Advanced Usage
## Basic
- help - show help info
- cls - clear out the current screen
- session - check details of the current session
- [reset](reset.md) - reset all injected/enhanced classes
- version - print the version of the Arthas attaching to the current target process
- quit/exit - exit the current Arthas client without affecting other clients
- shutdown - terminate the Arthas server and all clients
* help - show help info
* cls - clear out the current screen
* session - check details of the current session
* [reset](reset.md) - reset all injected/enhanced classes
* version - print the version of the Arthas attaching to the current target process
* quit/exit - exit the current Arthas client without affecting other clients
* shutdown - terminate the Arthas server and all clients
## JVM
+75
View File
@@ -0,0 +1,75 @@
Arthas Console Keymap
===
`keymap` command print current keymap.
The default keymap is:
| Shortcut | Shortcut Description | Command Name | Command Description |
| ------------- | ---------------- | -------------------- | ---------------- |
| `"\C-a"` | ctrl + a | beginning-of-line | go to the beginning of the line |
| ` "\C-e"` | ctrl + e | end-of-line | go to the end of the line|
| `"\C-f"` | ctrl + f | forward-word | forward a word |
| `"\C-b"` | ctrl + b | backward-word | backward a word |
| `"\e[D"` | left arrow | backward-char | backward a character |
| `"\e[C"` | right arrow | forward-char | forward a character |
| `"\e[B"` | down arrow | next-history | show next history command |
| `"\e[A"` | up arrow | previous-history | show previous history command |
| `"\C-h"` | ctrl + h | backward-delete-char | backward delete a character |
| `"\C-?"` | ctrl + shift + / | backward-delete-char | backward delete a character |
| `"\C-u"` | ctrl + u | undo | clear current line |
| `"\C-d"` | ctrl + d | delete-char | delete the character of the current cursor |
| `"\C-k"` | ctrl + k | kill-line | delete all characters from the current cursor to the end of the line |
| `"\C-i"` | ctrl + i | complete | Auto completion, equivalent to `TAB` |
| `"\C-j"` | ctrl + j | accept-line | end the current line, equivalent to `enter` |
| `"\C-m"` | ctrl + m | accept-line | end the current line, equivalent to `enter` |
| `"\C-w"` | | backward-delete-word | |
| `"\C-x\e[3~"` | | backward-kill-line | |
| `"\e\C-?"` | | backward-kill-word | |
* You can enter `Tab` to get automatic prompts at any time.
* After typing the command, type `-` or `--`, then press `tab` to display the specific options of this command.
#### Custom shortcuts
Create a new `$USER_HOME/.arthas/conf/inputrc` file in the current user home directory and add a custom configuration.
Suppose I am a heavy user of vim. I want to set `ctrl+h` to the cursor forward character. Set it as follows, first copy the default configuration.
```
"\C-a": beginning-of-line
"\C-e": end-of-line
"\C-f": forward-word
"\C-b": backward-word
"\e[D": backward-char
"\e[C": forward-char
"\e[B": next-history
"\e[A": previous-history
"\C-h": backward-delete-char
"\C-?": backward-delete-char
"\C-u": undo
"\C-d": delete-char
"\C-k": kill-line
"\C-i": complete
"\C-j": accept-line
"\C-m": accept-line
"\C-w": backward-delete-word
"\C-x\e[3~": backward-kill-line
"\e\C-?": backward-kill-word
```
Then replace `"\C-h": backward-delete-char` with `"\C-h": backward-char`, then reconnect.
#### Shortcuts about async
* ctrl + c: Terminate current command
* ctrl + z: Suspend the current command, you can restore this command with bg/fg, or kill it.
* ctrl + a: Go to the beginning the line
* ctrl + e: Go to the end of the line
+54
View File
@@ -0,0 +1,54 @@
reset
===
> Reset all classes that have been enhanced by Arthas, and all enhanced classes will be reset when Arthas server `shutdown`.
### Usage
```
$ reset -h
USAGE:
reset [-h] [-E] [class-pattern]
SUMMARY:
Reset all the enhanced classes
EXAMPLES:
reset
reset *List
reset -E .*List
OPTIONS:
-h, --help this help
-E, --regex Enable regular expression to match (wildcard matching by default)
<class-pattern> Path and classname of Pattern Matching
```
### Reset specified class
```
$ trace Test test
Press Ctrl+C to abort.
Affect(class-cnt:1 , method-cnt:1) cost in 57 ms.
`---ts=2017-10-26 17:10:33;thread_name=main;id=1;is_daemon=false;priority=5;TCCL=sun.misc.Launcher$AppClassLoader@14dad5dc
`---[0.590102ms] Test:test()
`---ts=2017-10-26 17:10:34;thread_name=main;id=1;is_daemon=false;priority=5;TCCL=sun.misc.Launcher$AppClassLoader@14dad5dc
`---[0.068692ms] Test:test()
$ reset Test
Affect(class-cnt:1 , method-cnt:0) cost in 11 ms.
```
### Reset all classes
```
$ trace Test test
Press Ctrl+C to abort.
Affect(class-cnt:1 , method-cnt:1) cost in 15 ms.
`---ts=2017-10-26 17:12:06;thread_name=main;id=1;is_daemon=false;priority=5;TCCL=sun.misc.Launcher$AppClassLoader@14dad5dc
`---[0.128518ms] Test:test()
$ reset
Affect(class-cnt:1 , method-cnt:0) cost in 9 ms.
```
+11
View File
@@ -0,0 +1,11 @@
Web Console
===
Arthas supports the Web Console. After attach success, the user can access: [http://localhost:8563/] (http://localhost:8563/).
The user can fill in the IP and connect the remote arthas on other machines.
![web console](_static/web-console-local.png)
If you have suggestions for the Web Console, please leave a message here: [https://github.com/alibaba/arthas/issues/15](https://github.com/alibaba/arthas/issues/15)