mirror of
https://github.com/alibaba/arthas.git
synced 2026-11-30 07:32:57 +00:00
update install-detail.md manual-install.md
This commit is contained in:
1 parent
0b302b2382
commit
5711612946
4 files changed
+191
-114
No files matched your search
@@ -1,24 +1,26 @@
|
||||
Install Arthas
|
||||
==============
|
||||
|
||||
## All Platform (recommended)
|
||||
## Quick installation
|
||||
|
||||
Latest Version, Click To Download: [](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)
|
||||
|
||||
Download and unzip, find `arthas-boot.jar` in the directory. Start with `java` command:
|
||||
### Use `arthas-boot`
|
||||
|
||||
Download`arthas-boot.jar`,Start with `java` command:
|
||||
|
||||
```bash
|
||||
wget https://alibaba.github.io/arthas/arthas-boot.jar
|
||||
java -jar arthas-boot.jar
|
||||
```
|
||||
|
||||
Print help information:
|
||||
Print usage:
|
||||
|
||||
```bash
|
||||
java -jar arthas-boot.jar -h
|
||||
```
|
||||
|
||||
|
||||
## Linux/Unix/Mac
|
||||
### Use `as.sh`
|
||||
|
||||
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:
|
||||
|
||||
@@ -30,59 +32,27 @@ The command above will download the bootstrap script `as.sh` to the current dire
|
||||
|
||||
You can enter its interactive interface by executing `as.sh`, or execute `as.sh -h` for more help information.
|
||||
|
||||
## Windows
|
||||
|
||||
## Full installation
|
||||
|
||||
Latest Version, Click To Download: [](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)
|
||||
|
||||
Download and unzip, then 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:)
|
||||
Download and unzip, find `arthas-boot.jar` in the directory. Start with `java` command:
|
||||
|
||||
```bash
|
||||
as.bat <pid>
|
||||
java -jar arthas-boot.jar
|
||||
```
|
||||
|
||||
Print usage:
|
||||
|
||||
```bash
|
||||
java -jar arthas-boot.jar -h
|
||||
```
|
||||
|
||||
## Manual Installation
|
||||
|
||||
[Manual Installation](manual-install.md)
|
||||
|
||||
If you fail to boot Arthas with the provided batch file, you could try to assemble the bootstrap command in the following way.
|
||||
|
||||
|
||||
1. Locate java in the target JVM:
|
||||
|
||||
- Linux/Unix/Mac: `ps aux | grep java`
|
||||
- Windows: open the Process Monitor to search java
|
||||
|
||||
2. Assemble bootstrap command:
|
||||
|
||||
Let's suppose we are using `/opt/jdk1.8/bin/java`, then the command should be:
|
||||
|
||||
```bash
|
||||
/opt/jdk1.8/bin/java -Xbootclasspath/a:/opt/jdk1.8/lib/tools.jar \
|
||||
-jar /tmp/arthas-packaging/arthas-core.jar \
|
||||
-pid 15146 \
|
||||
-target-ip 127.0.0.1 -telnet-port 3658 -http-port 8563 \
|
||||
-core /tmp/arthas-packaging/arthas-core.jar \
|
||||
-agent /tmp/arthas-packaging/arthas/arthas-agent.jar
|
||||
```
|
||||
|
||||
Note:
|
||||
|
||||
* `-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
|
||||
|
||||
If you are running on JDK 1.9 or above,then it's unncessary to add `tools.jar` in option `-Xbootclasspath`.
|
||||
|
||||
You can find the logs from `~/logs/arthas/arthas.log`.
|
||||
|
||||
3. Use telnet to connect once attaching to the target JVM (in step 2) succeeds
|
||||
|
||||
```bash
|
||||
telnet 127.0.0.1 3658
|
||||
```
|
||||
|
||||
## Offline Help Documentation
|
||||
|
||||
@@ -97,4 +67,4 @@ Latest Version, Click To Download:[](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)
|
||||
@@ -31,3 +33,70 @@ Manually Install Arthas
|
||||
```bash
|
||||
./as.sh
|
||||
```
|
||||
|
||||
|
||||
## Startup with as.sh/as.bat
|
||||
|
||||
### Linux/Unix/Mac
|
||||
|
||||
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
|
||||
curl -L https://alibaba.github.io/arthas/install.sh | sh
|
||||
```
|
||||
|
||||
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`.
|
||||
|
||||
You can enter its interactive interface by executing `as.sh`, or execute `as.sh -h` for more help information.
|
||||
|
||||
### Windows
|
||||
|
||||
Latest Version, Click To Download: [](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)
|
||||
|
||||
Download and unzip, then 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
|
||||
as.bat <pid>
|
||||
```
|
||||
|
||||
## Manual command line startup
|
||||
|
||||
If you fail to boot Arthas with the provided batch file, you could try to assemble the bootstrap command in the following way.
|
||||
|
||||
|
||||
1. Locate java in the target JVM:
|
||||
|
||||
- Linux/Unix/Mac: `ps aux | grep java`
|
||||
- Windows: open the Process Monitor to search java
|
||||
|
||||
2. Assemble bootstrap command:
|
||||
|
||||
Let's suppose we are using `/opt/jdk1.8/bin/java`, then the command should be:
|
||||
|
||||
```bash
|
||||
/opt/jdk1.8/bin/java -Xbootclasspath/a:/opt/jdk1.8/lib/tools.jar \
|
||||
-jar /tmp/arthas-packaging/arthas-core.jar \
|
||||
-pid 15146 \
|
||||
-target-ip 127.0.0.1 -telnet-port 3658 -http-port 8563 \
|
||||
-core /tmp/arthas-packaging/arthas-core.jar \
|
||||
-agent /tmp/arthas-packaging/arthas/arthas-agent.jar
|
||||
```
|
||||
|
||||
Note:
|
||||
|
||||
* `-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
|
||||
|
||||
If you are running on JDK 1.9 or above,then it's unncessary to add `tools.jar` in option `-Xbootclasspath`.
|
||||
|
||||
You can find the logs from `~/logs/arthas/arthas.log`.
|
||||
|
||||
3. Use telnet to connect once attaching to the target JVM (in step 2) succeeds
|
||||
|
||||
```bash
|
||||
telnet 127.0.0.1 3658
|
||||
```
|
||||
@@ -1,8 +1,40 @@
|
||||
Arthas Install
|
||||
=============
|
||||
|
||||
## 快速安装
|
||||
|
||||
## 全平台通用(推荐)
|
||||
### 使用`arthas-boot`
|
||||
|
||||
下载`arthas-boot.jar`,然后用`java -jar`的方式启动:
|
||||
|
||||
```bash
|
||||
wget https://alibaba.github.io/arthas/arthas-boot.jar
|
||||
java -jar arthas-boot.jar
|
||||
```
|
||||
|
||||
打印帮助信息:
|
||||
|
||||
```bash
|
||||
java -jar arthas-boot.jar -h
|
||||
```
|
||||
|
||||
* 如果下载速度比较慢,可以使用aliyun的镜像:`java -jar arthas-boot.jar --repo-mirror aliyun --use-http`
|
||||
|
||||
### 使用`as.sh`
|
||||
|
||||
Arthas 支持在 Linux/Unix/Mac 等平台上一键安装,请复制以下内容,并粘贴到命令行中,敲 `回车` 执行即可:
|
||||
|
||||
```bash
|
||||
curl -L https://alibaba.github.io/arthas/install.sh | sh
|
||||
```
|
||||
|
||||
上述命令会下载启动脚本文件 `as.sh` 到当前目录,你可以放在任何地方或将其加入到 `$PATH` 中。
|
||||
|
||||
直接在shell下面执行`./as.sh`,就会进入交互界面。
|
||||
|
||||
也可以执行`./as.sh -h`来获取更多参数信息。
|
||||
|
||||
## 全量安装
|
||||
|
||||
最新版本,点击下载:[](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)
|
||||
|
||||
@@ -19,73 +51,10 @@ java -jar arthas-boot.jar -h
|
||||
```
|
||||
|
||||
|
||||
## Linux/Unix/Mac
|
||||
|
||||
Arthas 支持在 Linux/Unix/Mac 等平台上一键安装,请复制以下内容,并粘贴到命令行中,敲 `回车` 执行即可:
|
||||
|
||||
```bash
|
||||
curl -L https://alibaba.github.io/arthas/install.sh | sh
|
||||
```
|
||||
|
||||
上述命令会下载启动脚本文件 `as.sh` 到当前目录,你可以放在任何地方或将其加入到 `$PATH` 中。
|
||||
|
||||
直接在shell下面执行`./as.sh`,就会进入交互界面。
|
||||
|
||||
也可以执行`./as.sh -h`来获取更多参数信息。
|
||||
|
||||
|
||||
## Windows
|
||||
|
||||
最新版本,点击下载:[](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)
|
||||
|
||||
|
||||
下载解压后在bin目录有 `as.bat`。此脚本暂时只接受一个参数 pid,即只能诊断本机上的 Java 进程。(欢迎精通bat脚本的开发者改进)
|
||||
|
||||
```
|
||||
as.bat <pid>
|
||||
```
|
||||
|
||||
## 手动安装
|
||||
|
||||
[手动安装](manual-install.md)
|
||||
|
||||
## 手动拼接命令行启动
|
||||
|
||||
如果启动遇到问题,可以尝试手动拼接出命令行参数来启动。
|
||||
|
||||
1. 查找目录jvm的java文件路径。
|
||||
|
||||
在linux/mac上执行`ps aux | grep java`,在windows上可以通过进程管理器来查看。假设是`/opt/jdk1.8/bin/java`。
|
||||
|
||||
2. 拼接出命令行
|
||||
|
||||
```bash
|
||||
/opt/jdk1.8/bin/java -Xbootclasspath/a:/opt/jdk1.8/lib/tools.jar \
|
||||
-jar /tmp/arthas-packaging/arthas-core.jar \
|
||||
-pid 15146 \
|
||||
-target-ip 127.0.0.1 -telnet-port 3658 -http-port 8563 \
|
||||
-core /tmp/arthas-packaging/arthas-core.jar \
|
||||
-agent /tmp/arthas-packaging/arthas/arthas-agent.jar
|
||||
```
|
||||
命令行分几部分组成:
|
||||
|
||||
* `-Xbootclasspath` 增加tools.jar
|
||||
* `-jar /tmp/arthas-packaging/arthas-core.jar` 指定main函数入口
|
||||
* `-pid 15146` 指定目标java进程ID
|
||||
* `-target-ip 127.0.0.1` 指定IP
|
||||
* `-telnet-port 3658 -http-port 8563` 指定telnet和http端口
|
||||
* `-core /tmp/arthas-packaging/arthas-core.jar -agent /tmp/arthas-packaging/arthas/arthas-agent.jar` 指定core/agent jar包
|
||||
|
||||
如果是`jdk > 9`,即9/10/11以上的版本,不需要指定`tools.jar`,直接去掉`-Xbootclasspath` 的配置即可。
|
||||
|
||||
启动目志输出在`~/logs/arthas/arthas.log`里。
|
||||
3. attach成功之后,使用telnet连接
|
||||
|
||||
```bash
|
||||
telnet 127.0.0.1 3658
|
||||
```
|
||||
|
||||
|
||||
## 离线帮助文档
|
||||
|
||||
最新版本,点击下载:[](http://repository.sonatype.org/service/local/artifact/maven/redirect?r=central-proxy&g=com.taobao.arthas&a=arthas-packaging&e=zip&c=doc&v=LATEST)
|
||||
@@ -100,4 +69,4 @@ as.bat <pid>
|
||||
rm -rf ~/.arthas/
|
||||
```
|
||||
|
||||
* Windows平台直接删除zip包和解压的文件
|
||||
* Windows平台直接删除user home下面的`.arthas`目录
|
||||
@@ -1,6 +1,9 @@
|
||||
手动安装Arthas
|
||||
===
|
||||
|
||||
## 手动安装Arthas
|
||||
|
||||
|
||||
1. 下载最新版本
|
||||
|
||||
**最新版本,点击下载**:[](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)
|
||||
@@ -34,4 +37,70 @@
|
||||
|
||||
```
|
||||
./as.sh
|
||||
```
|
||||
```
|
||||
|
||||
## 以脚本的方式启动as.sh/as.bat
|
||||
|
||||
### Linux/Unix/Mac
|
||||
|
||||
Arthas 支持在 Linux/Unix/Mac 等平台上一键安装,请复制以下内容,并粘贴到命令行中,敲 `回车` 执行即可:
|
||||
|
||||
```bash
|
||||
curl -L https://alibaba.github.io/arthas/install.sh | sh
|
||||
```
|
||||
|
||||
上述命令会下载启动脚本文件 `as.sh` 到当前目录,你可以放在任何地方或将其加入到 `$PATH` 中。
|
||||
|
||||
直接在shell下面执行`./as.sh`,就会进入交互界面。
|
||||
|
||||
也可以执行`./as.sh -h`来获取更多参数信息。
|
||||
|
||||
|
||||
### Windows
|
||||
|
||||
最新版本,点击下载:[](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)
|
||||
|
||||
|
||||
下载解压后在bin目录有 `as.bat`。此脚本暂时只接受一个参数 pid,即只能诊断本机上的 Java 进程。(欢迎精通bat脚本的开发者改进)
|
||||
|
||||
```
|
||||
as.bat <pid>
|
||||
```
|
||||
|
||||
## 手动拼接命令行启动
|
||||
|
||||
如果启动遇到问题,可以尝试手动拼接出命令行参数来启动。
|
||||
|
||||
1. 查找目录jvm的java文件路径。
|
||||
|
||||
在linux/mac上执行`ps aux | grep java`,在windows上可以通过进程管理器来查看。假设是`/opt/jdk1.8/bin/java`。
|
||||
|
||||
2. 拼接出命令行
|
||||
|
||||
```bash
|
||||
/opt/jdk1.8/bin/java -Xbootclasspath/a:/opt/jdk1.8/lib/tools.jar \
|
||||
-jar /tmp/arthas-packaging/arthas-core.jar \
|
||||
-pid 15146 \
|
||||
-target-ip 127.0.0.1 -telnet-port 3658 -http-port 8563 \
|
||||
-core /tmp/arthas-packaging/arthas-core.jar \
|
||||
-agent /tmp/arthas-packaging/arthas/arthas-agent.jar
|
||||
```
|
||||
命令行分几部分组成:
|
||||
|
||||
* `-Xbootclasspath` 增加tools.jar
|
||||
* `-jar /tmp/arthas-packaging/arthas-core.jar` 指定main函数入口
|
||||
* `-pid 15146` 指定目标java进程ID
|
||||
* `-target-ip 127.0.0.1` 指定IP
|
||||
* `-telnet-port 3658 -http-port 8563` 指定telnet和http端口
|
||||
* `-core /tmp/arthas-packaging/arthas-core.jar -agent /tmp/arthas-packaging/arthas/arthas-agent.jar` 指定core/agent jar包
|
||||
|
||||
如果是`jdk > 9`,即9/10/11以上的版本,不需要指定`tools.jar`,直接去掉`-Xbootclasspath` 的配置即可。
|
||||
|
||||
启动目志输出在`~/logs/arthas/arthas.log`里。
|
||||
3. attach成功之后,使用telnet连接
|
||||
|
||||
```bash
|
||||
telnet 127.0.0.1 3658
|
||||
```
|
||||
|
||||
|
||||
Reference in new issue
Block a user