update doc

This commit is contained in:
hengyunabc committed 2020-06-05 16:33:57 +08:00
1 parent 8400c4ebe3
commit 19d9a8184e
136 files changed
+339 -277

No files matched your search

+1 -1
View File
@@ -45,7 +45,7 @@ Advanced Usage
## monitor/watch/trace - related
> **Attention**: commands here are taking advantage of byte-code-injection, which means we are injecting some [aspects](https://en.wikipedia.org/wiki/Aspect-oriented_programming) into the current classes for monitoring and statistics purpose. Therefore when use it for online troubleshooting in your production environment, you'd better **explicitly specify** classes/methods/criteria, and remember to remove the injected code by `stop` or `reset`.
> **Attention**: commands here are taking advantage of byte-code-injection, which means we are injecting some [aspects](https://en.wikipedia.org/wiki/Aspect-oriented_programming) into the current classes for monitoring and statistics purpose. Therefore, when using it for online troubleshooting in your production environment, you'd better **explicitly specify** classes/methods/criteria, and remember to remove the injected code by `stop` or `reset`.
* [monitor](monitor.md) - monitor method execution statistics
* [watch](watch.md) - display the input/output parameter, return object, and thrown exception of specified method invocation
+4 -3
View File
@@ -40,8 +40,8 @@ You can see that there is currently a background job executing:
When the job is executing in the foreground, for example, directly executing the command `trace Test t`, or executing the background job command `trace Test t &`, then putting the job back to the foreground via `fg` command, the console cannot continue to execute other command, but can receive and process the following keyboard events:
* ‘ctrl + z’: Suspend the job, the job status will change to `Stopped`, and the job can be restarted by `bg <job-id>` or `fg <job-id>`
* ‘ctrl + c’: Stop the job
* ‘ctrl + z’: Suspends the job, the job status will change to `Stopped`, and the job can be restarted by `bg <job-id>` or `fg <job-id>`
* ‘ctrl + c’: Stops the job
* ‘ctrl + d’: According to linux semantics this should lead to exit the terminal, right now Arthas has not implemented this yet, therefore simply ignore this keystroke.
## 4. fg/bg, switch the job from the foreground to the background, and vise verse
@@ -60,7 +60,7 @@ $ trace Test t >> test.out &
The trace command will be running in the background and the output will be redirect to `~/logs/arthas-cache/test.out`. You can continue to execute other commands in the console, at the same time, you can also examine the execution result from the output file.
When connect to a remote Arthas server, you may not be able to view the output file on the remote machine. In this case, Arthas also supports automatically redirecting the output to the local cache file. Examples are as follows:
When connected to a remote Arthas server, you may not be able to view the output file on the remote machine. In this case, Arthas also supports automatically redirecting the output to the local cache file. Examples are as follows:
```bash
$ trace Test t >> &
@@ -78,3 +78,4 @@ If you want to stop background job, just `kill <job-id>`.
* Support up to 8 commands at the same time to redirect the output to the log files.
* Do not open too many background jobs at the same time to avoid negative performance effect to the target JVM.
* If you do not want to stop the Arthas service and continue to perform background tasks, you can exit the Arthas console by executing `quit` command (`stop` command will stop the Arthas service)
+1 -1
View File
@@ -38,7 +38,7 @@ Use `-c` also can specify the commands, like this:
./as.sh -c 'sysprop; thread' 56328 > test.out
```
#### Step 3: Check the outputs
#### Step 3: Check the output
```bash
cat test.out
+1 -1
View File
@@ -3,7 +3,7 @@ classloader
View hierarchy, urls and classes-loading info for the class-loaders.
`classloader` can search and print out the URLs for a specified resource from one particular classloader. It is quite handy when analyze `ResourceNotFoundException`.
`classloader` can search and print out the URLs for a specified resource from one particular classloader. It is quite handy when analyzing `ResourceNotFoundException`.
### Options
+7 -7
View File
@@ -42,15 +42,15 @@ All Commands
### Basic Arthas Commands
* help - examine help information
* cls - clear out the screen
* session - examine the current session
* [reset](reset.md) - reset enhanced classes. All enhanced classes will be reset to their original states. When Arthas server closes, all these enhanced classes will be reset too
* version - print out Arthas's version
* help - examines help information
* cls - clears out the screen
* session - examines the current session
* [reset](reset.md) - resets enhanced classes. All enhanced classes will be reset to their original states. When Arthas server closes, all these enhanced classes will be reset too
* version - prints out Arthas's version
* history - view command history
* quit - exit the current Arthas client without affecting other clients
* stop - terminate the Arthas server, all the Arthas clients connecting to this server will be disconnected
* [keymap](keymap.md) - list all Arthas keyboard shortcuts and shortcut customizations.
* stop - terminates the Arthas server, all the Arthas clients connecting to this server will be disconnected
* [keymap](keymap.md) - lists all Arthas keyboard shortcuts and shortcut customizations.
+1 -1
View File
@@ -3,7 +3,7 @@ Download
## Download full package
### Dwonload from maven central
### Download from maven central
Latest Version, Click To Download: [![](https://img.shields.io/maven-central/v/com.taobao.arthas/arthas-packaging.svg?style=flat-square "Arthas")](http://repository.sonatype.org/service/local/artifact/maven/redirect?r=central-proxy&g=com.taobao.arthas&a=arthas-packaging&e=zip&c=bin&v=LATEST)
+1 -1
View File
@@ -1,7 +1,7 @@
getstatic
=========
* It is recommended to use the [OGNL] (ognl.md) command, which will be more flexibility.
* It is recommended to use the [OGNL] (ognl.md) command, which will be more flexible.
Check the static fields of classes conveniently, the usage is `getstatic class_name field_name`.
+1 -1
View File
@@ -6,7 +6,7 @@ groovy
### Limitations
1. Prohibit from alternating the original logic. Like `watch` command, The major purpose of scripting is monitoring and observing.
1. Only allow to monitor at the stages of before/success/exception/finish on one method.
2. Only allow to monitor at the stages of before/success/exception/finish on one method.
### Parameters
+2 -1
View File
@@ -34,7 +34,7 @@ Arthas is built to solve these issues. A developer can troubleshoot production i
* Supports Linux/Mac/Windows
**If you are using Arthas, please let us know. Your use is very important to us: [View](https://github.com/alibaba/arthas/issues/111)**
**If you are using Arthas, please let us know. Your feedback is very important to us: [View](https://github.com/alibaba/arthas/issues/111)**
Contents
--------
@@ -52,3 +52,4 @@ Contents
* [Fork me at GitHub](https://github.com/alibaba/arthas)
* [Compile and debug/CONTRIBUTING](https://github.com/alibaba/arthas/blob/master/CONTRIBUTING.md#)
* [Release Notes](https://github.com/alibaba/arthas/releases)
* [Contact us](contact-us.md)
+1 -1
View File
@@ -4,7 +4,7 @@ Install Arthas
## Quick installation
### Use `arthas-boot`(Recommend)
### Use `arthas-boot`(Recommended)
Download`arthas-boot.jar`,Start with `java` command:
+2 -2
View File
@@ -62,8 +62,8 @@ then replace `"\C-h": backward-delete-char` with `"\C-h": backward-char`, then r
#### Shortcuts for jobs
* `ctrl + c`: Terminate current command
* `ctrl + z`: Suspend the current command, you can restore this command with `bg`/`fg`, or `kill` it.
* `ctrl + c`: Terminates current command
* `ctrl + z`: Suspends 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
+1 -1
View File
@@ -8,7 +8,7 @@ curl -O https://alibaba.github.io/arthas/arthas-demo.jar
java -jar arthas-demo.jar
```
`arthas-demo` is a simple program that generates a random number every second, then find all prime factors of the number.
`arthas-demo` is a simple program that generates a random number every second, then it finds all prime factors of that number.
The source code of `arthas-demo`: [View](https://github.com/alibaba/arthas/blob/master/demo/src/main/java/demo/MathGame.java)