Skip to content

Commit

Permalink
update install-detail.md manual-install.md
Browse files Browse the repository at this point in the history
  • Loading branch information
hengyunabc committed Nov 29, 2018
1 parent 0b302b2 commit 5711612
Show file tree
Hide file tree
Showing 4 changed files with 174 additions and 97 deletions.
66 changes: 18 additions & 48 deletions site/src/site/sphinx/en/install-detail.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,26 @@
Install Arthas
==============

## All Platform (recommended)
## Quick installation

Latest Version, Click To Download: [![Arthas](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)

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:

Expand All @@ -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: [![Arthas](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)

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
```

## 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:
Print usage:

- 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
```bash
java -jar arthas-boot.jar -h
```

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`.
## Manual Installation

3. Use telnet to connect once attaching to the target JVM (in step 2) succeeds
[Manual Installation](manual-install.md)

```bash
telnet 127.0.0.1 3658
```

## Offline Help Documentation

Expand All @@ -97,4 +67,4 @@ Latest Version, Click To Download:[![Arthas](https://img.shields.io/maven-centra
rm -rf ~/.arthas/
```

* On Windows, simply delete the zip file and unzipped files.
* On Windows, delete `.arthas` directory under user home.
69 changes: 69 additions & 0 deletions site/src/site/sphinx/en/manual-install.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
Manually Install Arthas
===================

## Manually Install Arthas

1. Download the latest version

**Latest version, Click To Download**: [![Arthas](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)
Expand Down Expand Up @@ -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: [![Arthas](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)

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
```
65 changes: 17 additions & 48 deletions site/src/site/sphinx/install-detail.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
Arthas Install
=============

## 快速安装

## 全平台通用(推荐)
### 使用`arthas-boot`

最新版本,点击下载:[![Arthas](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)

解压后,在文件夹里有`arthas-boot.jar`,直接用`java -jar`的方式启动:
下载`arthas-boot.jar`,然后用`java -jar`的方式启动:

```bash
wget https://alibaba.github.io/arthas/arthas-boot.jar
java -jar arthas-boot.jar
```

Expand All @@ -18,8 +18,9 @@ java -jar arthas-boot.jar
java -jar arthas-boot.jar -h
```

* 如果下载速度比较慢,可以使用aliyun的镜像:`java -jar arthas-boot.jar --repo-mirror aliyun --use-http`

## Linux/Unix/Mac
### 使用`as.sh`

Arthas 支持在 Linux/Unix/Mac 等平台上一键安装,请复制以下内容,并粘贴到命令行中,敲 `回车` 执行即可:

Expand All @@ -33,58 +34,26 @@ curl -L https://alibaba.github.io/arthas/install.sh | sh

也可以执行`./as.sh -h`来获取更多参数信息。


## Windows
## 全量安装

最新版本,点击下载:[![Arthas](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)

解压后,在文件夹里有`arthas-boot.jar`,直接用`java -jar`的方式启动:

下载解压后在bin目录有 `as.bat`。此脚本暂时只接受一个参数 pid,即只能诊断本机上的 Java 进程。(欢迎精通bat脚本的开发者改进)

```
as.bat <pid>
```bash
java -jar arthas-boot.jar
```

## 手动安装

[手动安装](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` 的配置即可。
```bash
java -jar arthas-boot.jar -h
```

启动目志输出在`~/logs/arthas/arthas.log`里。
3. attach成功之后,使用telnet连接

```bash
telnet 127.0.0.1 3658
```
## 手动安装

[手动安装](manual-install.md)

## 离线帮助文档

Expand All @@ -100,4 +69,4 @@ as.bat <pid>
rm -rf ~/.arthas/
```

* Windows平台直接删除zip包和解压的文件
* Windows平台直接删除user home下面的`.arthas`目录
71 changes: 70 additions & 1 deletion site/src/site/sphinx/manual-install.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
手动安装Arthas
===

## 手动安装Arthas


1. 下载最新版本

**最新版本,点击下载**[![Arthas](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)
Expand Down Expand Up @@ -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

最新版本,点击下载:[![Arthas](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)


下载解压后在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
```


0 comments on commit 5711612

Please sign in to comment.