Skip to content

Commit

Permalink
fix: reorder subheadings in advance-use
Browse files Browse the repository at this point in the history
  • Loading branch information
Fatpandac committed Aug 14, 2023
1 parent 39e5a6e commit 86e15c7
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 25 deletions.
22 changes: 13 additions & 9 deletions site/docs/doc/advanced-use.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,9 @@

- [Arthas 后台异步任务](async.md)

## 批处理功能

- [批处理功能](batch-support.md)

## Docker

Docker arthas 在 docker 容器中使用配置参考。
Arthas 在 docker 容器中使用配置参考。

- [Docker](docker.md)

Expand Down Expand Up @@ -48,23 +44,31 @@ Arthas 支持配置项参考。
## 以 java agent 方式启动

- [以 java agent 方式启动](agent.md)
-
## Arthas Spring Boot Starter

随应用一起启动。

- [Arthas Spring Boot Starter](spring-boot-starter.md)

## 执行结果存日志

所有执行记录的结果完整保存在日志文件中,便于后续进行分析。

- [执行结果存日志](save-log.md)

## Arthas Spring Boot Starter

- [Arthas Spring Boot Starter](spring-boot-starter.md)

## HTTP API

Http API 提供结构化的数据,支持更复杂的交互功能,方便自定义界面集成 arthas。

- [HTTP API](http-api.md)

## 批处理功能

方便自定义脚本一次性批量运行多个命令,可结合 `--select` 参数可以指定进程名字一起使用。

- [批处理功能](batch-support.md)

## as.sh 和 arthas-boot 技巧

- 通过`select`功能选择 attach 的进程。
Expand Down
14 changes: 7 additions & 7 deletions site/docs/doc/batch-support.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
# 批处理功能

::: tip
通过批处理功能,arthas 支持一次性批量运行多个命令,并取得命令执行的结果。
通过批处理功能,arthas 支持一次性批量运行多个命令,并取得命令执行的结果。可结合 `--select` 参数可以指定进程名字一起使用。
:::

## 使用方法

### 第一步: 创建你的批处理脚本
### 第一步:创建你的批处理脚本

这里我们新建了一个`test.as`脚本,为了规范,我们采用了.as 后缀名,但事实上任意的文本文件都 ok。

::: tip

- 目前需要每个命令占一行
- dashboard 务必指定执行次数(`-n`),否则会导致批处理脚本无法终止
- watch/tt/trace/monitor/stack 等命令务必指定执行次数(`-n`),否则会导致批处理脚本无法终止
- dashboard 务必指定执行次数 (`-n`),否则会导致批处理脚本无法终止
- watch/tt/trace/monitor/stack 等命令务必指定执行次数 (`-n`),否则会导致批处理脚本无法终止
- 可以使用异步后台任务,如 `watch c.t.X test returnObj > &`,让命令一直在后台运行,通过日志获取结果,[获取更多异步任务的信息](async.md)
:::

Expand All @@ -27,9 +27,9 @@ thread
sc -d org.apache.commons.lang.StringUtils
```

### 第二步: 运行你的批处理脚本
### 第二步:运行你的批处理脚本

通过`-f`执行脚本文件, 批处理脚本默认会输出到标准输出中,可以将结果重定向到文件中。
通过`-f`执行脚本文件,批处理脚本默认会输出到标准输出中,可以将结果重定向到文件中。

```bash
./as.sh -f /var/tmp/test.as <pid> > test.out # pid 可以通过 jps 命令查看
Expand All @@ -41,7 +41,7 @@ sc -d org.apache.commons.lang.StringUtils
./as.sh -c 'sysprop; thread' <pid> > test.out # pid 可以通过 jps 命令查看
```

### 第三步: 查看运行结果
### 第三步:查看运行结果

```bash
cat test.out
Expand Down
22 changes: 13 additions & 9 deletions site/docs/en/doc/advanced-use.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,9 @@ If you need to investigate an issue, but you are unsure about the exact time it

- [Arthas Async Jobs](async.md)

## Batch Processing

- [Batch Processing](batch-support.md)

## Docker

Docker arthas configuration reference for using in Docker containers.
Arthas configuration reference for using in Docker containers.

- [Docker](docker.md)

Expand Down Expand Up @@ -49,22 +45,30 @@ Arthas supports configuration options reference.

- [Start as a Java Agent](agent.md)

## Arthas Spring Boot Starter

Starting with the application.

- [Arthas Spring Boot Starter](spring-boot-starter.md)

## Log the output

All execution records are fully saved in the log file for subsequent analysis.

- [log the output](save-log.md)

## Arthas Spring Boot Starter

- [Arthas Spring Boot Starter](spring-boot-starter.md)

## HTTP API

The Http API provides structured data and supports more complex interactive functions, making it easier to integrate Arthas into custom interfaces.

- [HTTP API](http-api.md)

## Batch Processing

It is convenient for running multiple commands in bulk with custom scripts. It can be used in conjunction with the `--select` parameter to specify the process name.

- [Batch Processing](batch-support.md)

## as.sh and arthas-boot tips

- Select the process to be attached via the `select` option.
Expand Down
1 change: 1 addition & 0 deletions site/docs/en/doc/batch-support.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Batch Processing

With the help of Batch Processing, you can run multiple commands in batch and get the final result at the end.
The process name can be specified using the “–select” parameter.

## Usage

Expand Down

1 comment on commit 86e15c7

@vercel
Copy link

@vercel vercel bot commented on 86e15c7 Aug 14, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.