Skip to content

Commit

Permalink
feat: restrict boot to use 3.x version and support website version sw…
Browse files Browse the repository at this point in the history
…itching (#2884)
  • Loading branch information
siuhui authored Sep 1, 2024
1 parent 2cf87ea commit 479f38b
Show file tree
Hide file tree
Showing 996 changed files with 511 additions and 27,443 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug-report--cn-.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ about: 提交Arthas Bug/使用疑问,使用这个模板

### 环境信息

* `arthas-boot.jar` 或者 `as.sh` 的版本: xxx
* `arthas-boot3.jar` 或者 `as3.sh` 的版本: xxx
* Arthas 版本: xxx
* 操作系统版本: xxx
* 目标进程的JVM版本: xxx
Expand Down
20 changes: 10 additions & 10 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,23 +32,23 @@ Recommend to use [`as-package.sh`](as-package.sh) to package, which will auto-in
* windows need to install gcc

F.Y.I
1. when using [`as.sh`](https://github.com/alibaba/arthas/blob/master/bin/as.sh) to start Arthas, it will get the latest version under `~/.arthas/lib`;
1. when using [`as3.sh`](https://github.com/alibaba/arthas/blob/master/bin/as3.sh) to start Arthas, it will get the latest version under `~/.arthas/lib`;
2. when [`as-package.sh`](as-package.sh) packaging, it will get the version from `pom.xml` and suffix it with the current timestamp e.g. `3.0.5.20180917161808`.

You can also use `./mvnw clean package -DskipTests` to package and generate a `zip` under `packaging/target/` but remember when `as.sh` starts, it load the version under `~/.arthas/lib`.
You can also use `./mvnw clean package -DskipTests` to package and generate a `zip` under `packaging/target/` but remember when `as3.sh` starts, it load the version under `~/.arthas/lib`.

### Start Arthas in specified version

When there are several different version, you can use `--use-version` to specify the version of Arthas to start your debug.

```bash
./as.sh --use-version 3.0.5.20180919185025
./as3.sh --use-version 3.0.5.20180919185025
```

Tip: you can use `--versions` to list all available versions.

```bash
./as.sh --versions
./as3.sh --versions
```

### Debug
Expand Down Expand Up @@ -97,22 +97,22 @@ Tip: you can use `--versions` to list all available versions.
* windows需要安装gcc


`as.sh`在启动时,会对`~/.arthas/lib`下面的目录排序,取最新的版本。`as-package.sh`在打包时,会取`pom.xml`里的版本号,再拼接上当前时间,比如: `3.0.5.20180917161808`,这样子排序时取的就是最新的版本。
`as3.sh`在启动时,会对`~/.arthas/lib`下面的目录排序,取最新的版本。`as-package.sh`在打包时,会取`pom.xml`里的版本号,再拼接上当前时间,比如: `3.0.5.20180917161808`,这样子排序时取的就是最新的版本。

也可以直接 `./mvnw clean package -DskipTests`打包,生成的zip在 `packaging/target/` 下面。但是注意`as.sh`启动加载的是`~/.arthas/lib`下面的版本。
也可以直接 `./mvnw clean package -DskipTests`打包,生成的zip在 `packaging/target/` 下面。但是注意`as3.sh`启动加载的是`~/.arthas/lib`下面的版本。

### 启动指定版本的arthas

本地开发时,可能会产生多个版本,可以用 `--use-version` 参数来指定版本,比如

```bash
./as.sh --use-version 3.0.5.20180919185025
./as3.sh --use-version 3.0.5.20180919185025
```

可以用`--versions`参数来列出所有版本:

```bash
./as.sh --versions
./as3.sh --versions
```

### Debug
Expand All @@ -133,7 +133,7 @@ Tip: you can use `--versions` to list all available versions.
发布release版本流程:

* 如果 arthas-vmtool 有更新,则需要手动触发action,构建后会把新的动态库文件提交到 lib 目录。 https://github.com/alibaba/arthas/actions/workflows/build-vmtool.yaml
* 修改`as.sh`里的版本,最后修改日期, `Bootstrap.java`里的版本,Dockerfile里的版本
* 修改`as3.sh`里的版本,最后修改日期, `Bootstrap.java`里的版本,Dockerfile里的版本
* 修改本地的maven settings.xml
* mvn clean deploy -DskipTests -P full -P release

Expand All @@ -146,7 +146,7 @@ Tip: you can use `--versions` to list all available versions.
版本号信息地址: https://maven.aliyun.com/repository/public/com/taobao/arthas/arthas-packaging/maven-metadata.xml

* 打上tag,push tag到仓库上
* 需要更新 gh-pages 分支下面的 arthas-boot.jar/math-game.jar/as.sh ,下载 doc.zip,解压覆盖掉文档的更新
* 需要更新 gh-pages 分支下面的 arthas-boot3.jar/math-game.jar/as3.sh ,下载 doc.zip,解压覆盖掉文档的更新
* 需要更新docker镜像,push新的tag:https://hub.docker.com/r/hengyunabc/arthas/tags?page=1&ordering=last_updated

以 3.6.5 版本为例:
Expand Down
79 changes: 38 additions & 41 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

[![Build Status](https://github.com/alibaba/arthas/workflows/JavaCI/badge.svg)](https://github.com/alibaba/arthas/actions)
[![codecov](https://codecov.io/gh/alibaba/arthas/branch/master/graph/badge.svg)](https://codecov.io/gh/alibaba/arthas)
[![maven](https://img.shields.io/maven-central/v/com.taobao.arthas/arthas-packaging.svg)](https://search.maven.org/search?q=g:com.taobao.arthas)
[![maven](https://img.shields.io/maven-central/v/com.taobao.arthas/arthas-packaging?versionPrefix=3)](https://search.maven.org/search?q=g:com.taobao.arthas)
![license](https://img.shields.io/github/license/alibaba/arthas.svg)
[![Average time to resolve an issue](http://isitmaintained.com/badge/resolution/alibaba/arthas.svg)](http://isitmaintained.com/project/alibaba/arthas "Average time to resolve an issue")
[![Percentage of issues still open](http://isitmaintained.com/badge/open/alibaba/arthas.svg)](http://isitmaintained.com/project/alibaba/arthas "Percentage of issues still open")
Expand Down Expand Up @@ -43,55 +43,52 @@ Arthas was built to solve these issues. A developer can troubleshoot your produc
* Supports JDK 6+.
* Supports Linux/Mac/Windows.


### [Online Tutorials(Recommended)](https://arthas.aliyun.com/doc/arthas-tutorials.html?language=en)

* [Usages](tutorials/katacoda/README.md#online-tutorial-usages)
### [Online Tutorials(Recommended)](https://arthas.aliyun.com/3.x/doc/arthas-tutorials.html?language=en)

### Quick start

#### Use `arthas-boot`(Recommended)
#### Use `arthas-boot3`(Recommended)

Download`arthas-boot.jar`,Start with `java` command:
Download`arthas-boot3.jar`,Start with `java` command:

```bash
curl -O https://arthas.aliyun.com/arthas-boot.jar
java -jar arthas-boot.jar
curl -O https://arthas.aliyun.com/arthas-boot3.jar
java -jar arthas-boot3.jar
```

Print usage:

```bash
java -jar arthas-boot.jar -h
java -jar arthas-boot3.jar -h
```

#### Use `as.sh`
#### Use `as3.sh`

You can install Arthas with one single line command on Linux, Unix, and Mac. Copy the following command and paste it into the command line, then press *Enter* to run:

```bash
curl -L https://arthas.aliyun.com/install.sh | sh
curl -L https://arthas.aliyun.com/install3.sh | sh
```

The command above will download the bootstrap script `as.sh` to the current directory. You can move it any other place you want, or put its location in `$PATH`.
The command above will download the bootstrap script `as3.sh` to the current directory. You can move it 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.
You can enter its interactive interface by executing `as3.sh`, or execute `as3.sh -h` for more help information.


### Documentation

* [Online Tutorials(Recommended)](https://arthas.aliyun.com/doc/arthas-tutorials.html?language=en)
* [User manual](https://arthas.aliyun.com/doc/en)
* [Installation](https://arthas.aliyun.com/doc/en/install-detail.html)
* [Download](https://arthas.aliyun.com/doc/en/download.html)
* [Quick start](https://arthas.aliyun.com/doc/en/quick-start.html)
* [Advanced usage](https://arthas.aliyun.com/doc/en/advanced-use.html)
* [Commands](https://arthas.aliyun.com/doc/en/commands.html)
* [WebConsole](https://arthas.aliyun.com/doc/en/web-console.html)
* [Docker](https://arthas.aliyun.com/doc/en/docker.html)
* [Arthas Spring Boot Starter](https://arthas.aliyun.com/doc/en/spring-boot-starter.html)
* [Online Tutorials(Recommended)](https://arthas.aliyun.com/3.x/doc/arthas-tutorials.html?language=en)
* [User manual](https://arthas.aliyun.com/3.x/doc/en)
* [Installation](https://arthas.aliyun.com/3.x/doc/en/install-detail.html)
* [Download](https://arthas.aliyun.com/3.x/doc/en/download.html)
* [Quick start](https://arthas.aliyun.com/3.x/doc/en/quick-start.html)
* [Advanced usage](https://arthas.aliyun.com/3.x/doc/en/advanced-use.html)
* [Commands](https://arthas.aliyun.com/3.x/doc/en/commands.html)
* [WebConsole](https://arthas.aliyun.com/3.x/doc/en/web-console.html)
* [Docker](https://arthas.aliyun.com/3.x/doc/en/docker.html)
* [Arthas Spring Boot Starter](https://arthas.aliyun.com/3.x/doc/en/spring-boot-starter.html)
* [User cases](https://github.com/alibaba/arthas/issues?q=label%3Auser-case)
* [FAQ](https://arthas.aliyun.com/doc/en/faq)
* [FAQ](https://arthas.aliyun.com/3.x/doc/en/faq)
* [Compile and debug/How to contribute](https://github.com/alibaba/arthas/blob/master/CONTRIBUTING.md)
* [Release Notes](https://github.com/alibaba/arthas/releases)

Expand All @@ -100,13 +97,13 @@ You can enter its interactive interface by executing `as.sh`, or execute `as.sh

#### Dashboard

* https://arthas.aliyun.com/doc/en/dashboard
* https://arthas.aliyun.com/3.x/doc/en/dashboard

![dashboard](site/docs/.vuepress/public/images/dashboard.png)

#### Thread

* https://arthas.aliyun.com/doc/en/thread
* https://arthas.aliyun.com/3.x/doc/en/thread

See what is eating your CPU (ranked by top CPU usage) and what is going on there in one glance:

Expand Down Expand Up @@ -139,7 +136,7 @@ $ thread -n 3

#### jad

* https://arthas.aliyun.com/doc/en/jad
* https://arthas.aliyun.com/3.x/doc/en/jad

Decompile your class with one shot:

Expand Down Expand Up @@ -179,7 +176,7 @@ public interface Servlet {
```

#### mc
* https://arthas.aliyun.com/doc/en/mc
* https://arthas.aliyun.com/3.x/doc/en/mc

Memory compiler, compiles `.java` files into `.class` files in memory.

Expand All @@ -189,7 +186,7 @@ $ mc /tmp/Test.java

#### retransform

* https://arthas.aliyun.com/doc/en/retransform
* https://arthas.aliyun.com/3.x/doc/en/retransform

Load the external `*.class` files to retransform/hotswap the loaded classes in JVM.

Expand All @@ -200,7 +197,7 @@ retransform -c 327a647b /tmp/Test.class /tmp/Test\$Inner.class

#### sc

* https://arthas.aliyun.com/doc/en/sc
* https://arthas.aliyun.com/3.x/doc/en/sc

Search any loaded class with detailed information.

Expand Down Expand Up @@ -239,7 +236,7 @@ $ sc -d org.springframework.web.context.support.XmlWebApplicationContext

#### vmtool

* https://arthas.aliyun.com/doc/en/vmtool
* https://arthas.aliyun.com/3.x/doc/en/vmtool

Get objects in the heap that are instances of the specified class.

Expand All @@ -261,7 +258,7 @@ $ vmtool --action getInstances --className java.lang.String --limit 10

#### stack

* https://arthas.aliyun.com/doc/en/stack
* https://arthas.aliyun.com/3.x/doc/en/stack

View the call stack of `test.arthas.TestStack#doGet`:

Expand Down Expand Up @@ -298,15 +295,15 @@ ts=2018-09-18 10:11:45;thread_name=http-bio-8080-exec-10;id=d9;is_daemon=true;pr

#### Trace

* https://arthas.aliyun.com/doc/en/trace
* https://arthas.aliyun.com/3.x/doc/en/trace

See what is slowing down your method invocation with trace command:

![trace](site/docs/.vuepress/public/images/trace.png)

#### Watch

* https://arthas.aliyun.com/doc/en/watch
* https://arthas.aliyun.com/3.x/doc/en/watch

Watch the first parameter and thrown exception of `test.arthas.TestWatch#doGet` only if it throws exception.

Expand All @@ -322,7 +319,7 @@ ts=2018-09-18 10:26:28;result=@ArrayList[

#### Monitor

* https://arthas.aliyun.com/doc/en/monitor
* https://arthas.aliyun.com/3.x/doc/en/monitor

Monitor a specific method invocation statistics, including the total number of invocations, average response time, success rate, and every 5 seconds:

Expand All @@ -345,7 +342,7 @@ Affect(class-cnt:1 , method-cnt:1) cost in 109 ms.

#### Time Tunnel(tt)

* https://arthas.aliyun.com/doc/en/tt
* https://arthas.aliyun.com/3.x/doc/en/tt

Record method invocation data, so that you can check the method invocation parameters, returned value, and thrown exceptions later. It works as if you could come back and replay the past method invocation via time tunnel.

Expand All @@ -368,7 +365,7 @@ Affect(class-cnt:1 , method-cnt:1) cost in 75 ms.

#### Classloader

* https://arthas.aliyun.com/doc/en/classloader
* https://arthas.aliyun.com/3.x/doc/en/classloader

```bash
$ classloader
Expand All @@ -387,14 +384,14 @@ $ classloader

#### Web Console

* https://arthas.aliyun.com/doc/en/web-console
* https://arthas.aliyun.com/3.x/doc/en/web-console

![web console](site/docs/.vuepress/public/images/web-console-local.png)


#### Profiler/FlameGraph

* https://arthas.aliyun.com/doc/en/profiler
* https://arthas.aliyun.com/3.x/doc/en/profiler

```bash
$ profiler start
Expand All @@ -413,7 +410,7 @@ View profiler results under arthas-output via browser:

#### Arthas Spring Boot Starter

* [Arthas Spring Boot Starter](https://arthas.aliyun.com/doc/spring-boot-starter.html)
* [Arthas Spring Boot Starter](https://arthas.aliyun.com/3.x/doc/spring-boot-starter.html)

### Known Users

Expand Down
Loading

0 comments on commit 479f38b

Please sign in to comment.