diff --git a/site/src/site/sphinx/_static/arthas-tunnel-server.png b/site/src/site/sphinx/_static/arthas-tunnel-server.png new file mode 100644 index 000000000..86ff84e8a Binary files /dev/null and b/site/src/site/sphinx/_static/arthas-tunnel-server.png differ diff --git a/site/src/site/sphinx/contact-us.md b/site/src/site/sphinx/contact-us.md index 3a884c707..bfaf243e2 100644 --- a/site/src/site/sphinx/contact-us.md +++ b/site/src/site/sphinx/contact-us.md @@ -11,13 +11,13 @@ Arthas开源交流钉钉群:21965291 ,搜索群号即可加入。 -![web console](_static/dingding_qr.jpg) +![](_static/dingding_qr.jpg) ### QQ群 Arthas开源交流QQ群:916328269 -![web console](_static/qqgroup_qr.jpg) +![](_static/qqgroup_qr.jpg) diff --git a/site/src/site/sphinx/dashboard.md b/site/src/site/sphinx/dashboard.md index 0a775e02b..8458c1065 100644 --- a/site/src/site/sphinx/dashboard.md +++ b/site/src/site/sphinx/dashboard.md @@ -58,4 +58,4 @@ uptime 16020s busy ### 截图展示 -![alt text](_static/dashboard.png "dashboard") +![](_static/dashboard.png "dashboard") diff --git a/site/src/site/sphinx/download.md b/site/src/site/sphinx/download.md index d8b1609fa..f0049b3f5 100644 --- a/site/src/site/sphinx/download.md +++ b/site/src/site/sphinx/download.md @@ -3,7 +3,7 @@ ## 下载全量包 -最新版本,点击下载:[![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=doc&v=LATEST) +最新版本,点击下载:[![](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=doc&v=LATEST) 解压后,在文件夹里有`arthas-boot.jar`,直接用`java -jar`的方式启动: @@ -19,5 +19,5 @@ java -jar arthas-boot.jar -h ## 下载离线文档 -下载文档:[![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=doc&v=LATEST) +下载文档:[![](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=doc&v=LATEST) diff --git a/site/src/site/sphinx/en/dashboard.md b/site/src/site/sphinx/en/dashboard.md index 21c3fa601..951d6f1c2 100644 --- a/site/src/site/sphinx/en/dashboard.md +++ b/site/src/site/sphinx/en/dashboard.md @@ -58,4 +58,4 @@ uptime 16020s busy ### Screenshot -![alt text](../_static/dashboard.png "dashboard") +![](../_static/dashboard.png "dashboard") diff --git a/site/src/site/sphinx/en/download.md b/site/src/site/sphinx/en/download.md index 5315a8d10..410779400 100644 --- a/site/src/site/sphinx/en/download.md +++ b/site/src/site/sphinx/en/download.md @@ -3,7 +3,7 @@ Download ## Download full package -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=doc&v=LATEST) +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=doc&v=LATEST) Download and unzip, find `arthas-boot.jar` in the directory. Start with `java` command: @@ -19,5 +19,5 @@ java -jar arthas-boot.jar -h ## Download Offline Help Documentation -Latest Version Documentation, 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=doc&v=LATEST) +Latest Version Documentation, 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=doc&v=LATEST) diff --git a/site/src/site/sphinx/en/index.md b/site/src/site/sphinx/en/index.md index da8099956..2136ad418 100644 --- a/site/src/site/sphinx/en/index.md +++ b/site/src/site/sphinx/en/index.md @@ -3,7 +3,7 @@ Arthas Documentation **[中文文档/Chinese Documentation](https://alibaba.github.io/arthas/)** -![arthas](arthas.png) +![](arthas.png) Arthas is a Java diagnostic tool open-sourced by Alibaba middleware team. It is widely adopted and popular among the developers inside Alibaba. Arthas helps developers in trouble-shooting issues in production environment for Java based applications without modifying code or restarting servers. @@ -44,6 +44,7 @@ Contents * [Quick start](quick-start.md) * [Advanced usage](advanced-use.md) * [Commands](commands.md) +* [WebConsole](web-console.md) * [Docker](docker.md) * [User cases](https://github.com/alibaba/arthas/issues?q=label%3Auser-case) * [Questions and answers](https://github.com/alibaba/arthas/issues?q=label%3Aquestion-answered) diff --git a/site/src/site/sphinx/en/install-detail.md b/site/src/site/sphinx/en/install-detail.md index f4546afa9..caea6e7bb 100644 --- a/site/src/site/sphinx/en/install-detail.md +++ b/site/src/site/sphinx/en/install-detail.md @@ -35,7 +35,7 @@ You can enter its interactive interface by executing `as.sh`, or execute `as.sh ## 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=doc&v=LATEST) +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=doc&v=LATEST) Download and unzip, find `arthas-boot.jar` in the directory. Start with `java` command: @@ -80,7 +80,7 @@ as.sh ## Offline Help Documentation -Latest Version Documentation, 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=doc&v=LATEST) +Latest Version Documentation, 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=doc&v=LATEST) ## Uninstall diff --git a/site/src/site/sphinx/en/manual-install.md b/site/src/site/sphinx/en/manual-install.md index 64b9a533e..0812988ba 100644 --- a/site/src/site/sphinx/en/manual-install.md +++ b/site/src/site/sphinx/en/manual-install.md @@ -5,7 +5,7 @@ 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) + **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) If the download speed is slow, try to use [Ali cloud mirror repository](https://maven.aliyun.com/), for example, to download version `3.x.x` (you can replace `3.x.x` in the example URL if you want to download other version), the download URL is: https://maven.aliyun.com/repository/public/com/taobao/arthas/arthas-packaging/3.x.x/arthas-packaging-3.x.x-bin.zip @@ -51,7 +51,7 @@ You can enter its interactive interface by executing `as.sh`, or execute `as.sh ### 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) +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) 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:) diff --git a/site/src/site/sphinx/en/web-console.md b/site/src/site/sphinx/en/web-console.md index 83dff1c40..6a3117472 100644 --- a/site/src/site/sphinx/en/web-console.md +++ b/site/src/site/sphinx/en/web-console.md @@ -1,11 +1,74 @@ Web Console === + +### Connect arthas through the browser + Arthas supports the Web Console. After attach success, the user can access: [http://127.0.0.1:8563/](http://127.0.0.1:8563/). The user can fill in the IP and connect the remote arthas on other machines. -![web console](_static/web-console-local.png) +![](_static/web-console-local.png) + +> By default, arthas only listens to `127.0.0.1`, so if you want to connect from a remote, you can use the `--target-ip` parameter to specify the IP. See the help description for `-h` for more information. + +If you have suggestions for the Web Console, please leave a message here: [https://github.com/alibaba/arthas/issues/15](https://github.com/alibaba/arthas/issues/15) + +### Connect remote arthas through arthas tunnel server + +#### Download and deploy arthas tunnel server + +https://github.com/alibaba/arthas/releases + +Arthas tunnel server is a spring boot fat jar application, start with the `java -jar` command: + +```bash +java -jar arthas-tunnel-server.jar +``` + +By default, the web port of the arthas tunnel server is `8080`, and the port connected by the arthas agent is `7777`. + +#### Connecting to the tunnel server when starting arthas + + +When starting arthas, you can use the `--tunnel-server` parameter, for example: + +```bash +as.sh --tunnel-server 'ws://47.75.156.201:7777/ws' +``` + +After Arthas attach succeeds, the agentId will be printed, such as: + +```bash + ,---. ,------. ,--------.,--. ,--. ,---. ,---. + / O \ | .--. ''--. .--'| '--' | / O \ ' .-' +| .-. || '--'.' | | | .--. || .-. |`. `-. +| | | || |\ \ | | | | | || | | |.-' | +`--' `--'`--' '--' `--' `--' `--'`--' `--'`-----' + + +wiki https://alibaba.github.io/arthas +tutorials https://alibaba.github.io/arthas/arthas-tutorials +version 3.1.2 +pid 86183 +time 2019-08-30 15:40:53 +id URJZ5L48RPBR2ALI5K4V +``` + +If the connection is not connected to the tunnel server at startup, you can also obtain the agentId through the `session` command after reconnection succeeds: + +```bash +[arthas@86183]$ session + Name Value +----------------------------------------------------- + JAVA_PID 86183 + SESSION_ID f7273eb5-e7b0-4a00-bc5b-3fe55d741882 + AGENT_ID URJZ5L48RPBR2ALI5K4V + TUNNEL_SERVER ws://47.75.156.201:7777/ws +``` + + +For the above example, go to http://47.75.156.201:8080/ in the browser and input the `agentId` to connect to arthas on remote machine. -If you have suggestions for the Web Console, please leave a message here: [https://github.com/alibaba/arthas/issues/15](https://github.com/alibaba/arthas/issues/15) \ No newline at end of file +![](_static/arthas-tunnel-server.png) \ No newline at end of file diff --git a/site/src/site/sphinx/index.md b/site/src/site/sphinx/index.md index 0c2bde308..784d979fb 100644 --- a/site/src/site/sphinx/index.md +++ b/site/src/site/sphinx/index.md @@ -5,7 +5,7 @@ Arthas 用户文档 ## Arthas(阿尔萨斯) 能为你做什么? -![arthas](arthas.png) +![](arthas.png) `Arthas` 是Alibaba开源的Java诊断工具,深受开发者喜爱。 @@ -32,6 +32,7 @@ Contents * [快速入门](quick-start.md) * [进阶使用](advanced-use.md) * [命令列表](commands.md) +* [WebConsole](web-console.md) * [Docker](docker.md) * [用户案例](https://github.com/alibaba/arthas/issues?q=label%3Auser-case) * [常见问题](https://github.com/alibaba/arthas/issues?q=label%3Aquestion-answered) diff --git a/site/src/site/sphinx/install-detail.md b/site/src/site/sphinx/install-detail.md index 3119c7692..066391fcb 100644 --- a/site/src/site/sphinx/install-detail.md +++ b/site/src/site/sphinx/install-detail.md @@ -53,7 +53,7 @@ curl -L https://alibaba.github.io/arthas/install.sh | sh ## 全量安装 -最新版本,点击下载:[![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) +最新版本,点击下载:[![](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`的方式启动: @@ -103,7 +103,7 @@ as.sh ## 离线帮助文档 -最新版本离线文档下载:[![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=doc&v=LATEST) +最新版本离线文档下载:[![](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=doc&v=LATEST) ## 卸载 diff --git a/site/src/site/sphinx/manual-install.md b/site/src/site/sphinx/manual-install.md index 499c7c43a..c7c6a1029 100644 --- a/site/src/site/sphinx/manual-install.md +++ b/site/src/site/sphinx/manual-install.md @@ -6,7 +6,7 @@ 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) + **最新版本,点击下载**:[![](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) 如果下载速度比较慢,可以尝试用[阿里云的镜像仓库](https://maven.aliyun.com/),比如要下载`3.x.x`版本(替换`3.x.x`为最新版本),下载的url是: @@ -58,7 +58,7 @@ curl -L https://alibaba.github.io/arthas/install.sh | sh ### 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) +最新版本,点击下载:[![](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脚本的开发者改进) diff --git a/site/src/site/sphinx/web-console.md b/site/src/site/sphinx/web-console.md index b8bb7fd52..9dead1cc6 100644 --- a/site/src/site/sphinx/web-console.md +++ b/site/src/site/sphinx/web-console.md @@ -1,10 +1,79 @@ Web Console === + + +### 通过浏览器连接arthas + + Arthas目前支持Web Console,用户在attach成功之后,可以直接访问:[http://127.0.0.1:8563/](http://127.0.0.1:8563/)。 可以填入IP,远程连接其它机器上的arthas。 -![web console](_static/web-console-local.png) +![](_static/web-console-local.png) + + +> 默认情况下,arthas只listen 127.0.0.1,所以如果想从远程连接,则可以使用 `--target-ip`参数指定listen的IP,更多参考`-h`的帮助说明。 +> 注意会有安全风险,考虑下面的tunnel server的方案。 + +后续更多Web Console功能支持,请到issue下留言:[https://github.com/alibaba/arthas/issues/15](https://github.com/alibaba/arthas/issues/15) + + +### 使用arthas tunnel server连接远程arthas + + +#### 下载部署arthas tunnel server + +https://github.com/alibaba/arthas/releases + +Arthas tunnel server是一个spring boot fat jar应用,直接`java -jar`启动: + +```bash +java -jar arthas-tunnel-server.jar +``` + +默认情况下,arthas tunnel server的web端口是`8080`,arthas agent连接的端口是`7777`。 + +#### 启动arthas时连接到tunnel server + +在启动arthas,可以传递`--tunnel-server`参数,比如: + +```bash +as.sh --tunnel-server 'ws://47.75.156.201:7777/ws' +``` + +attach成功之后,会打印出agentId,比如: + +```bash + ,---. ,------. ,--------.,--. ,--. ,---. ,---. + / O \ | .--. ''--. .--'| '--' | / O \ ' .-' +| .-. || '--'.' | | | .--. || .-. |`. `-. +| | | || |\ \ | | | | | || | | |.-' | +`--' `--'`--' '--' `--' `--' `--'`--' `--'`-----' + + +wiki https://alibaba.github.io/arthas +tutorials https://alibaba.github.io/arthas/arthas-tutorials +version 3.1.2 +pid 86183 +time 2019-08-30 15:40:53 +id URJZ5L48RPBR2ALI5K4V +``` + +如果是启动时没有连接到 tunnel server,也可以在后续自动重连成功之后,通过 session命令来获取 agentId: + +```bash +[arthas@86183]$ session + Name Value +----------------------------------------------------- + JAVA_PID 86183 + SESSION_ID f7273eb5-e7b0-4a00-bc5b-3fe55d741882 + AGENT_ID URJZ5L48RPBR2ALI5K4V + TUNNEL_SERVER ws://47.75.156.201:7777/ws +``` + + +以上面的为例,在浏览器里访问 http://47.75.156.201:8080/ ,输入 `agentId`,就可以连接到本机上的arthas了。 + -后续更多Web Console功能支持,请到issue下留言:[https://github.com/alibaba/arthas/issues/15](https://github.com/alibaba/arthas/issues/15) \ No newline at end of file +![](_static/arthas-tunnel-server.png) \ No newline at end of file