Skip to content

Commit

Permalink
update quick-start.md
Browse files Browse the repository at this point in the history
  • Loading branch information
hengyunabc committed Nov 29, 2018
1 parent c6b639b commit 0b302b2
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
11 changes: 6 additions & 5 deletions site/src/site/sphinx/en/quick-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,13 @@ Quick Start
## 1. Start Demo Application

```bash
wget 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.


If there is no `arthas-demo.jar` locally, you can download it from here:[Click](http://repository.sonatype.org/service/local/artifact/maven/redirect?r=central-proxy&g=com.taobao.arthas&a=arthas-boot&v=LATEST)

You can also compile code by youself:[View](https://github.com/alibaba/arthas/blob/master/demo/src/main/java/demo)
The source code of `arthas-demo`: [View](https://github.com/alibaba/arthas/blob/master/demo/src/main/java/demo/MathGame.java)

## 2. Start Arthas

Expand All @@ -21,10 +19,13 @@ You can also compile code by youself:[View](https://github.com/alibaba/arthas/bl
Execute the following command in the command line:

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

> The user to run this command *MUST* have the same privilege as the owner of the target process, as a simple example you can try the following command if the target process is managed by user `admin`: `sudo su admin && java -jar arthas-boot.jar` or `sudo -u admin -EH java -jar arthas-boot.jar`.If you cannot be able to attach to the target process, please check the logs under `~/logs/arthas` for troubleshooting.
* The user to run this command *MUST* have the same privilege as the owner of the target process, as a simple example you can try the following command if the target process is managed by user `admin`: `sudo su admin && java -jar arthas-boot.jar` or `sudo -u admin -EH java -jar arthas-boot.jar`
* .If you cannot be able to attach to the target process, please check the logs under `~/logs/arthas` for troubleshooting.
* `java -jar arthas-boot.jar -h` print usage.

Select the target Java process to attach:

Expand Down
14 changes: 7 additions & 7 deletions site/src/site/sphinx/quick-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,28 @@
## 1. 启动Demo

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

`arthas-demo`是一个简单的程序,每隔一秒生成一个随机数,再执行质因式分解,并打印出分解结果。


如果本地没有`arthas-demo.jar`, 可以从这里下载: [点击](http://repository.sonatype.org/service/local/artifact/maven/redirect?r=central-proxy&g=com.taobao.arthas&a=arthas-boot&v=LATEST)

也可以自己从代码里编绎运行:[查看](https://github.com/alibaba/arthas/blob/master/demo/src/main/java/demo)
`arthas-demo`源代码:[查看](https://github.com/alibaba/arthas/blob/master/demo/src/main/java/demo/MathGame.java)


## 2. 启动arthas

在命令行下面执行:

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

> 执行该程序的用户需要和目标进程具有相同的权限。比如以`admin`用户来执行:
> `sudo su admin && java -jar arthas-boot.jar``sudo -u admin -EH java -jar arthas-boot.jar`
> 如果attatch不上目标进程,可以查看`~/logs/arthas/` 目录下的日志。
* 执行该程序的用户需要和目标进程具有相同的权限。比如以`admin`用户来执行:`sudo su admin && java -jar arthas-boot.jar``sudo -u admin -EH java -jar arthas-boot.jar`
* 如果attatch不上目标进程,可以查看`~/logs/arthas/` 目录下的日志。
* 如果下载速度比较慢,可以使用aliyun的镜像:`java -jar arthas-boot.jar --repo-mirror aliyun --use-http`
* `java -jar arthas-boot.jar -h` 打印更多参数信息。


选择应用java进程:
Expand Down

0 comments on commit 0b302b2

Please sign in to comment.