Skip to content

Commit da72d4e

Browse files
committed
rename 'as.sh' to 'as3.sh', 'arthas-boot.jar' to 'arthas-boot3.jar'
1 parent 5d43454 commit da72d4e

File tree

171 files changed

+670
-684
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

171 files changed

+670
-684
lines changed

.github/ISSUE_TEMPLATE/bug-report--cn-.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ about: 提交Arthas Bug/使用疑问,使用这个模板
88

99
### 环境信息
1010

11-
* `arthas-boot.jar` 或者 `as.sh` 的版本: xxx
11+
* `arthas-boot3.jar` 或者 `as3.sh` 的版本: xxx
1212
* Arthas 版本: xxx
1313
* 操作系统版本: xxx
1414
* 目标进程的JVM版本: xxx

CONTRIBUTING.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,23 +32,23 @@ Recommend to use [`as-package.sh`](as-package.sh) to package, which will auto-in
3232
* windows need to install gcc
3333

3434
F.Y.I
35-
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`;
35+
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`;
3636
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`.
3737

38-
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`.
38+
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`.
3939

4040
### Start Arthas in specified version
4141

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

4444
```bash
45-
./as.sh --use-version 3.0.5.20180919185025
45+
./as3.sh --use-version 3.0.5.20180919185025
4646
```
4747

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

5050
```bash
51-
./as.sh --versions
51+
./as3.sh --versions
5252
```
5353

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

9999

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

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

104104
### 启动指定版本的arthas
105105

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

108108
```bash
109-
./as.sh --use-version 3.0.5.20180919185025
109+
./as3.sh --use-version 3.0.5.20180919185025
110110
```
111111

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

114114
```bash
115-
./as.sh --versions
115+
./as3.sh --versions
116116
```
117117

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

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

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

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

152152
以 3.6.5 版本为例:

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -50,32 +50,32 @@ Arthas was built to solve these issues. A developer can troubleshoot your produc
5050

5151
### Quick start
5252

53-
#### Use `arthas-boot`(Recommended)
53+
#### Use `arthas-boot3`(Recommended)
5454

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

5757
```bash
58-
curl -O https://arthas.aliyun.com/arthas-boot.jar
59-
java -jar arthas-boot.jar
58+
curl -O https://arthas.aliyun.com/arthas-boot3.jar
59+
java -jar arthas-boot3.jar
6060
```
6161

6262
Print usage:
6363

6464
```bash
65-
java -jar arthas-boot.jar -h
65+
java -jar arthas-boot3.jar -h
6666
```
6767

68-
#### Use `as.sh`
68+
#### Use `as3.sh`
6969

7070
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:
7171

7272
```bash
73-
curl -L https://arthas.aliyun.com/install.sh | sh
73+
curl -L https://arthas.aliyun.com/install3.sh | sh
7474
```
7575

76-
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`.
76+
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`.
7777

78-
You can enter its interactive interface by executing `as.sh`, or execute `as.sh -h` for more help information.
78+
You can enter its interactive interface by executing `as3.sh`, or execute `as3.sh -h` for more help information.
7979

8080

8181
### Documentation

README_CN.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -36,36 +36,36 @@ English version goes [here](README.md).
3636

3737
### 快速开始
3838

39-
#### 使用`arthas-boot`(推荐)
39+
#### 使用`arthas-boot3`(推荐)
4040

41-
下载`arthas-boot.jar`,然后用`java -jar`的方式启动:
41+
下载`arthas-boot3.jar`,然后用`java -jar`的方式启动:
4242

4343
```bash
44-
curl -O https://arthas.aliyun.com/arthas-boot.jar
45-
java -jar arthas-boot.jar
44+
curl -O https://arthas.aliyun.com/arthas-boot3.jar
45+
java -jar arthas-boot3.jar
4646
```
4747

4848
打印帮助信息:
4949

5050
```bash
51-
java -jar arthas-boot.jar -h
51+
java -jar arthas-boot3.jar -h
5252
```
5353

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

56-
#### 使用`as.sh`
56+
#### 使用`as3.sh`
5757

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

6060
```bash
61-
curl -L https://arthas.aliyun.com/install.sh | sh
61+
curl -L https://arthas.aliyun.com/install3.sh | sh
6262
```
6363

64-
上述命令会下载启动脚本文件 `as.sh` 到当前目录,你可以放在任何地方或将其加入到 `$PATH` 中。
64+
上述命令会下载启动脚本文件 `as3.sh` 到当前目录,你可以放在任何地方或将其加入到 `$PATH` 中。
6565

66-
直接在shell下面执行`./as.sh`,就会进入交互界面。
66+
直接在shell下面执行`./as3.sh`,就会进入交互界面。
6767

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

7070
### 文档
7171

bin/as3.sh

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -188,23 +188,23 @@ esac
188188

189189
# check curl/grep/awk/telnet/unzip command
190190
if ! [ -x "$(command -v curl)" ]; then
191-
echo 'Error: curl is not installed. Try to use java -jar arthas-boot.jar' >&2
191+
echo 'Error: curl is not installed. Try to use java -jar arthas-boot3.jar' >&2
192192
exit 1
193193
fi
194194
if ! [ -x "$(command -v grep)" ]; then
195-
echo 'Error: grep is not installed. Try to use java -jar arthas-boot.jar' >&2
195+
echo 'Error: grep is not installed. Try to use java -jar arthas-boot3.jar' >&2
196196
exit 1
197197
fi
198198
if ! [ -x "$(command -v awk)" ]; then
199-
echo 'Error: awk is not installed. Try to use java -jar arthas-boot.jar' >&2
199+
echo 'Error: awk is not installed. Try to use java -jar arthas-boot3.jar' >&2
200200
exit 1
201201
fi
202202
if ! [ -x "$(command -v telnet)" ]; then
203-
echo 'Error: telnet is not installed. Try to use java -jar arthas-boot.jar' >&2
203+
echo 'Error: telnet is not installed. Try to use java -jar arthas-boot3.jar' >&2
204204
exit 1
205205
fi
206206
if ! [ -x "$(command -v unzip)" ]; then
207-
echo 'Error: unzip is not installed. Try to use java -jar arthas-boot.jar' >&2
207+
echo 'Error: unzip is not installed. Try to use java -jar arthas-boot3.jar' >&2
208208
exit 1
209209
fi
210210

@@ -466,20 +466,20 @@ Options and Arguments:
466466
<pid> Target pid
467467
468468
EXAMPLES:
469-
./as.sh <pid>
470-
./as.sh --telnet-port 9999 --http-port -1
471-
./as.sh --username admin --password <password>
472-
./as.sh --tunnel-server 'ws://192.168.10.11:7777/ws' --app-name demoapp
473-
./as.sh --tunnel-server 'ws://192.168.10.11:7777/ws' --agent-id bvDOe8XbTM2pQWjF4cfw
474-
./as.sh --stat-url 'http://192.168.10.11:8080/api/stat'
475-
./as.sh -c 'sysprop; thread' <pid>
476-
./as.sh -f batch.as <pid>
477-
./as.sh --use-version 3.7.2
478-
./as.sh --session-timeout 3600
479-
./as.sh --attach-only
480-
./as.sh --disabled-commands stop,dump
481-
./as.sh --select math-game
482-
./as.sh --repo-mirror aliyun --use-http
469+
./as3.sh <pid>
470+
./as3.sh --telnet-port 9999 --http-port -1
471+
./as3.sh --username admin --password <password>
472+
./as3.sh --tunnel-server 'ws://192.168.10.11:7777/ws' --app-name demoapp
473+
./as3.sh --tunnel-server 'ws://192.168.10.11:7777/ws' --agent-id bvDOe8XbTM2pQWjF4cfw
474+
./as3.sh --stat-url 'http://192.168.10.11:8080/api/stat'
475+
./as3.sh -c 'sysprop; thread' <pid>
476+
./as3.sh -f batch.as <pid>
477+
./as3.sh --use-version 3.7.2
478+
./as3.sh --session-timeout 3600
479+
./as3.sh --attach-only
480+
./as3.sh --disabled-commands stop,dump
481+
./as3.sh --select math-game
482+
./as3.sh --repo-mirror aliyun --use-http
483483
WIKI:
484484
https://arthas.aliyun.com/doc
485485
@@ -812,8 +812,8 @@ parse_arguments()
812812
fi
813813
if [[ ($httpPortPid) && ($TARGET_PID != $httpPortPid) ]]; then
814814
echo "Target process $TARGET_PID is not the process using port $(getHttpPortOrDefault), you will connect to an unexpected process."
815-
echo "1. Try to restart as.sh, select process $httpPortPid, shutdown it first with running the 'stop' command."
816-
echo "2. Try to use different http port, for example: as.sh --telnet-port 9998 --http-port 9999"
815+
echo "1. Try to restart as3.sh, select process $httpPortPid, shutdown it first with running the 'stop' command."
816+
echo "2. Try to use different http port, for example: as3.sh --telnet-port 9998 --http-port 9999"
817817
exit 1
818818
fi
819819
elif [ -z ${TARGET_PID} ]; then
@@ -931,8 +931,8 @@ sanity_check() {
931931
if [ "$current_user" != "$target_user" ]; then
932932
echo "The current user ($current_user) does not match with the owner of process ${TARGET_PID} ($target_user)."
933933
echo "To solve this, choose one of the following command:"
934-
echo " 1) sudo su $target_user && ./as.sh"
935-
echo " 2) sudo -u $target_user -EH ./as.sh"
934+
echo " 1) sudo su $target_user && ./as3.sh"
935+
echo " 2) sudo -u $target_user -EH ./as3.sh"
936936
exit_on_err 1
937937
fi
938938
}
@@ -972,15 +972,15 @@ port_pid_check() {
972972

973973
print_telnet_port_pid_error() {
974974
echo "[ERROR] The telnet port $(getTelnetPortOrDefault) is used by process $telnetPortPid instead of target process $TARGET_PID, you will connect to an unexpected process."
975-
echo "[ERROR] 1. Try to restart as.sh, select process $telnetPortPid, shutdown it first with running the 'stop' command."
975+
echo "[ERROR] 1. Try to restart as3.sh, select process $telnetPortPid, shutdown it first with running the 'stop' command."
976976
echo "[ERROR] 2. Try to stop the existing arthas instance: java -jar arthas-client.jar 127.0.0.1 $(getTelnetPortOrDefault) -c \"stop\""
977-
echo "[ERROR] 3. Try to use different telnet port, for example: as.sh --telnet-port 9998 --http-port -1"
977+
echo "[ERROR] 3. Try to use different telnet port, for example: as3.sh --telnet-port 9998 --http-port -1"
978978
}
979979

980980
print_telnet_port_used_error() {
981981
local error_msg=$1
982982
echo "[ERROR] The telnet port $(getTelnetPortOrDefault) is used, but process $error_msg, you will connect to an unexpected process."
983-
echo "[ERROR] Try to use different telnet port, for example: as.sh --telnet-port 9998 --http-port -1"
983+
echo "[ERROR] Try to use different telnet port, for example: as3.sh --telnet-port 9998 --http-port -1"
984984
}
985985

986986
# active console

bin/install-local.sh renamed to bin/install-local3.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ if [[ ! -x ${ARTHAS_LIB_HOME} ]]; then
2626
cp *.jar ${ARTHAS_LIB_HOME}/
2727

2828
# make it -x
29-
chmod +x ./as.sh
29+
chmod +x ./as3.sh
3030

3131
fi
3232

bin/install.sh renamed to bin/install3.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
#! /bin/bash
22

3-
# temp file of as.sh
4-
TEMP_ARTHAS_FILE="./as.sh.$$"
3+
# temp file of as3.sh
4+
TEMP_ARTHAS_FILE="./as3.sh.$$"
55

6-
# target file of as.sh
7-
TARGET_ARTHAS_FILE="./as.sh"
6+
# target file of as3.sh
7+
TARGET_ARTHAS_FILE="./as3.sh"
88

99
# update timeout(sec)
1010
SO_TIMEOUT=60
1111

1212
# default downloading url
13-
ARTHAS_FILE_URL="https://arthas.aliyun.com/as.sh"
13+
ARTHAS_FILE_URL="https://arthas.aliyun.com/as3.sh"
1414

1515
# exit shell with err_code
1616
# $1 : err_code
@@ -40,7 +40,7 @@ curl \
4040
|| exit_on_err 1 "download failed!"
4141

4242
# write or overwrite local file
43-
rm -rf as.sh
43+
rm -rf as3.sh
4444
mv ${TEMP_ARTHAS_FILE} ${TARGET_ARTHAS_FILE}
4545
chmod +x ${TARGET_ARTHAS_FILE}
4646

boot/src/main/java/com/taobao/arthas/boot/Bootstrap.java

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -45,20 +45,20 @@
4545
*/
4646
@Name("arthas-boot")
4747
@Summary("Bootstrap Arthas")
48-
@Description("EXAMPLES:\n" + " java -jar arthas-boot.jar <pid>\n"
49-
+ " java -jar arthas-boot.jar --telnet-port 9999 --http-port -1\n"
50-
+ " java -jar arthas-boot.jar --username admin --password <password>\n"
51-
+ " java -jar arthas-boot.jar --tunnel-server 'ws://192.168.10.11:7777/ws' --app-name demoapp\n"
52-
+ " java -jar arthas-boot.jar --tunnel-server 'ws://192.168.10.11:7777/ws' --agent-id bvDOe8XbTM2pQWjF4cfw\n"
53-
+ " java -jar arthas-boot.jar --stat-url 'http://192.168.10.11:8080/api/stat'\n"
54-
+ " java -jar arthas-boot.jar -c 'sysprop; thread' <pid>\n"
55-
+ " java -jar arthas-boot.jar -f batch.as <pid>\n"
56-
+ " java -jar arthas-boot.jar --use-version 3.7.2\n"
57-
+ " java -jar arthas-boot.jar --versions\n"
58-
+ " java -jar arthas-boot.jar --select math-game\n"
59-
+ " java -jar arthas-boot.jar --session-timeout 3600\n" + " java -jar arthas-boot.jar --attach-only\n"
60-
+ " java -jar arthas-boot.jar --disabled-commands stop,dump\n"
61-
+ " java -jar arthas-boot.jar --repo-mirror aliyun --use-http\n" + "WIKI:\n"
48+
@Description("EXAMPLES:\n" + " java -jar arthas-boot3.jar <pid>\n"
49+
+ " java -jar arthas-boot3.jar --telnet-port 9999 --http-port -1\n"
50+
+ " java -jar arthas-boot3.jar --username admin --password <password>\n"
51+
+ " java -jar arthas-boot3.jar --tunnel-server 'ws://192.168.10.11:7777/ws' --app-name demoapp\n"
52+
+ " java -jar arthas-boot3.jar --tunnel-server 'ws://192.168.10.11:7777/ws' --agent-id bvDOe8XbTM2pQWjF4cfw\n"
53+
+ " java -jar arthas-boot3.jar --stat-url 'http://192.168.10.11:8080/api/stat'\n"
54+
+ " java -jar arthas-boot3.jar -c 'sysprop; thread' <pid>\n"
55+
+ " java -jar arthas-boot3.jar -f batch.as <pid>\n"
56+
+ " java -jar arthas-boot3.jar --use-version 3.7.2\n"
57+
+ " java -jar arthas-boot3.jar --versions\n"
58+
+ " java -jar arthas-boot3.jar --select math-game\n"
59+
+ " java -jar arthas-boot3.jar --session-timeout 3600\n" + " java -jar arthas-boot3.jar --attach-only\n"
60+
+ " java -jar arthas-boot3.jar --disabled-commands stop,dump\n"
61+
+ " java -jar arthas-boot3.jar --repo-mirror aliyun --use-http\n" + "WIKI:\n"
6262
+ " https://arthas.aliyun.com/doc\n")
6363
public class Bootstrap {
6464
private static final int DEFAULT_TELNET_PORT = 3658;
@@ -86,7 +86,7 @@ public class Bootstrap {
8686
* <pre>
8787
* The directory contains arthas-core.jar/arthas-client.jar/arthas-spy.jar.
8888
* 1. When use-version is not empty, try to find arthas home under ~/.arthas/lib
89-
* 2. Try set the directory where arthas-boot.jar is located to arthas home
89+
* 2. Try set the directory where arthas-boot3.jar is located to arthas home
9090
* 3. Try to download from remote repo
9191
* </pre>
9292
*/
@@ -412,7 +412,7 @@ public static void main(String[] args) throws ParserConfigurationException, SAXE
412412
pid, bootstrap.getHttpPortOrDefault());
413413
AnsiLog.error("1. Try to restart arthas-boot, select process {}, shutdown it first with running the 'stop' command.",
414414
httpPortPid);
415-
AnsiLog.error("2. Or try to use different http port, for example: java -jar arthas-boot.jar --telnet-port 9998 --http-port 9999");
415+
AnsiLog.error("2. Or try to use different http port, for example: java -jar arthas-boot3.jar --telnet-port 9998 --http-port 9999");
416416
System.exit(1);
417417
}
418418

@@ -440,7 +440,7 @@ public static void main(String[] args) throws ParserConfigurationException, SAXE
440440
arthasHomeDir = specialVersionDir;
441441
}
442442

443-
// Try set the directory where arthas-boot.jar is located to arthas home
443+
// Try set the directory where arthas-boot3.jar is located to arthas home
444444
if (arthasHomeDir == null) {
445445
CodeSource codeSource = Bootstrap.class.getProtectionDomain().getCodeSource();
446446
if (codeSource != null) {
@@ -646,7 +646,7 @@ private static void checkTelnetPortPid(Bootstrap bootstrap, long telnetPortPid,
646646
AnsiLog.error("1. Try to restart arthas-boot, select process {}, shutdown it first with running the 'stop' command.",
647647
telnetPortPid);
648648
AnsiLog.error("2. Or try to stop the existing arthas instance: java -jar arthas-client.jar 127.0.0.1 {} -c \"stop\"", bootstrap.getTelnetPortOrDefault());
649-
AnsiLog.error("3. Or try to use different telnet port, for example: java -jar arthas-boot.jar --telnet-port 9998 --http-port -1");
649+
AnsiLog.error("3. Or try to use different telnet port, for example: java -jar arthas-boot3.jar --telnet-port 9998 --http-port -1");
650650
System.exit(1);
651651
}
652652
}
@@ -677,7 +677,7 @@ private static long findProcessByTelnetClient(String arthasHomeDir, int telnetPo
677677
}
678678
if (error != null) {
679679
AnsiLog.error("The telnet port {} is used, but process {}, you will connect to an unexpected process.", telnetPort, error);
680-
AnsiLog.error("Try to use a different telnet port, for example: java -jar arthas-boot.jar --telnet-port 9998 --http-port -1");
680+
AnsiLog.error("Try to use a different telnet port, for example: java -jar arthas-boot3.jar --telnet-port 9998 --http-port -1");
681681
System.exit(1);
682682
}
683683

0 commit comments

Comments
 (0)