mirror of
https://github.com/alibaba/arthas.git
synced 2026-11-30 15:33:59 +00:00
enhance the translation
This commit is contained in:
1 parent
4068350f53
commit
ee2cbb130b
1 file changed
+25
-34
@@ -1,51 +1,45 @@
|
|||||||
Arthas Install
|
Install Arthas
|
||||||
==============
|
==============
|
||||||
|
|
||||||
## Linux/Unix/Mac
|
## Linux/Unix/Mac
|
||||||
|
|
||||||
You can install Arthas in one single line as:
|
You can install Arthas with one single line command on Linux, Unix, and Mac. Pls. copy the following command and paste it into the command line, then press *Enter* to run:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
curl -L https://alibaba.github.io/arthas/install.sh | sh
|
curl -L https://alibaba.github.io/arthas/install.sh | sh
|
||||||
```
|
```
|
||||||
|
|
||||||
The command line above will download the booting script `as.sh` to the current directory and you can then start Arthas by `./as.sh`, for more help info you can use `./as.sh -h` to check the details.
|
The command above will download the bootstrap script `as.sh` to the current directory. You can move it the any other place you want, or put its location in `$PATH`.
|
||||||
|
|
||||||
By the way, you can also add the absolute path of the script `as.sh` to `$PATH` to make it available globally.
|
You can enter its interactive interface by executing `as.sh`, or execute `as.sh -h` for more help information.
|
||||||
|
|
||||||
## Windows
|
## Windows
|
||||||
|
|
||||||
Latest Version: [](http://search.maven.org/classic/#search%7Cga%7C1%7Cg%3A%22com.taobao.arthas%22%20AND%20a%3A%22arthas-packaging%22)
|
Latest Version: [](http://search.maven.org/classic/#search%7Cga%7C1%7Cg%3A%22com.taobao.arthas%22%20AND%20a%3A%22arthas-packaging%22)
|
||||||
|
|
||||||
Download the latest `bin.zip`, unzip the package and you can find the `as.bat`. For now this script will only take one argument `pid` which means you can only diagnose the local Java process. (Welcome any bat script expert to make it better :heart:)
|
Download the latest `bin.zip`, unzip the package, and find `as.bat` from 'bin' directory. For now this script will only take one argument `pid`, which means you can only diagnose the local Java process. (Welcome any bat script expert to make it better :heart:)
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
as.bat <pid>
|
as.bat <pid>
|
||||||
```
|
```
|
||||||
|
|
||||||
A small tip:
|
To have a better experience, you can start the Arthas Server locally by executing `as.bat <pid>`, then run `./as.sh <pid>@<ip>:<por>` in another Linux/Unix/Mac machine.
|
||||||
|
|
||||||
If you are asking for better UX, you can start the Arthas Server locally by `as.bat <pid>` and then use `./as.sh <pid>@<ip>:<por>`in another Linux/Unix/Mac machine.
|
> If the color is not working as expect on windows, you can use [conemu](https://sourceforge.net/projects/conemu) to get it to work.
|
||||||
|
|
||||||
|
|
||||||
Another tip:
|
|
||||||
|
|
||||||
If in Windows, the color is not working as expect. You can try [conemu](https://sourceforge.net/projects/conemu) to get it to work.
|
|
||||||
|
|
||||||
## Manual Installation
|
## Manual Installation
|
||||||
|
|
||||||
[Manual Installation](manual-install.md)
|
[Manual Installation](manual-install.md)
|
||||||
|
|
||||||
## Advanced Manual Boot
|
If you fail to boot Arthas with the provided batch file, you could try to assemble the bootstrap command in the following way.
|
||||||
|
|
||||||
If you cannot boot Arthas, try to pass in all the critical options manually as the following steps:
|
|
||||||
|
|
||||||
1. locate the java for JVM:
|
1. Locate java in the target JVM:
|
||||||
|
|
||||||
- Linux/Unix/Mac: `ps aux | grep java`
|
- Linux/Unix/Mac: `ps aux | grep java`
|
||||||
- Windows: open the Process Monitor to search java
|
- Windows: open the Process Monitor to search java
|
||||||
|
|
||||||
2. Concatenate the command
|
2. Assemble bootstrap command:
|
||||||
|
|
||||||
Let's suppose we are using `/opt/jdk1.8/bin/java`, then the command should be:
|
Let's suppose we are using `/opt/jdk1.8/bin/java`, then the command should be:
|
||||||
|
|
||||||
@@ -58,21 +52,20 @@ If you cannot boot Arthas, try to pass in all the critical options manually as t
|
|||||||
-agent /tmp/arthas-packaging/arthas/arthas-agent.jar
|
-agent /tmp/arthas-packaging/arthas/arthas-agent.jar
|
||||||
```
|
```
|
||||||
|
|
||||||
* `-Xbootclasspath` add tools.jar
|
Note:
|
||||||
* `-jar /tmp/arthas-packaging/arthas-core.jar` specify main entry
|
|
||||||
* `-pid 15146` specify the target java process pid
|
|
||||||
* `-target-ip 127.0.0.1` specify the IP
|
|
||||||
* `-telnet-port 3658 -http-port 8563` specify telnet and http ports
|
|
||||||
* `-core /tmp/arthas-packaging/arthas-core.jar -agent /tmp/arthas-packaging/arthas/arthas-agent.jar` specify core/agent jar package
|
|
||||||
|
|
||||||
|
* `-Xbootclasspath` adds tools.jar
|
||||||
|
* `-jar /tmp/arthas-packaging/arthas-core.jar` specifies main entry
|
||||||
|
* `-pid 15146` specifies the target java process PID
|
||||||
|
* `-target-ip 127.0.0.1` specifies the IP
|
||||||
|
* `-telnet-port 3658 -http-port 8563` specifies telnet and HTTP ports for remote access
|
||||||
|
* `-core /tmp/arthas-packaging/arthas-core.jar -agent /tmp/arthas-packaging/arthas/arthas-agent.jar` specifies core/agent jar package
|
||||||
|
|
||||||
But if you are using JDK 1.9 or above,then you do not need to add `tools.jar` in option `-Xbootclasspath`.
|
If you are running on JDK 1.9 or above,then it's unncessary to add `tools.jar` in option `-Xbootclasspath`.
|
||||||
|
|
||||||
F.Y.I the booting log will be printed to `~/logs/arthas/arthas.log`.
|
You can find the logs from `~/logs/arthas/arthas.log`.
|
||||||
|
|
||||||
3. Connect via telnet
|
3. Use telnet to connect once attaching to the target JVM (in step 2) succeeds
|
||||||
|
|
||||||
When attached successfully, you can connect it with
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
telnet localhost 3658
|
telnet localhost 3658
|
||||||
@@ -86,12 +79,10 @@ Download the latest `doc.zip`.
|
|||||||
|
|
||||||
## Uninstall
|
## Uninstall
|
||||||
|
|
||||||
### Linux/Unix/Mac
|
* On Linux/Unix/Mac, delete the files with the following command:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
rm -rf ~/.arthas/ ~/.arthas_history
|
rm -rf ~/.arthas/ ~/.arthas_history
|
||||||
```
|
```
|
||||||
|
|
||||||
### Windows
|
* On Windows, simply delete the zip file and unzipped files.
|
||||||
|
|
||||||
Directly delete the `zip` and unzipped files.
|
|
||||||
Reference in new issue
Block a user