---
title: "一键常规信息收集 - 敏捷诊断工具 V2.1.0 | OceanBase 文档中心"
description: 一键常规信息收集 本文适用于独立部署 obdiag 的场景，使用 obdiag gather 命令可帮助 OceanBase 数据库相关的诊断信息收集。 如果是 obd 部署的集群，可直接通过 obd 侧诊断命令组对所选集群进行信息收集，详细命令可参考 诊断工具命令组 。 前提条件 采集信息回传的时候会用到目标主机的…
---
切换语言

- 中文站 - 简体中文
- International - English
- 日本站 - 日本語

文档反馈![](https://mdn.alipayobjects.com/huamei_22khvb/afts/img/A*5ZXST55u540AAAAAAAAAAAAADiGDAQ/original) 敏捷诊断工具V 2.1.0

# 一键常规信息收集

更新时间：2024-07-11 14:36:55

[编辑](https://github.com/oceanbase/odt-doc/edit/V2.1.0/zh-CN/400.gather/401.obdiag-gather-normal-guide.md)  

本文适用于独立部署 obdiag 的场景，使用 obdiag gather 命令可帮助 OceanBase 数据库相关的诊断信息收集。

如果是 obd 部署的集群，可直接通过 obd 侧诊断命令组对所选集群进行信息收集，详细命令可参考 [诊断工具命令组](https://www.oceanbase.com/docs/community-obd-cn-10000000002049483)。

## 前提条件

采集信息回传的时候会用到目标主机的 zip 工具进行压缩，所以需要到被采集主机上安装 zip 工具。

## gather 命令组总览

```shell
obdiag gather <gather type> [options]

```

`gather type` 包含如下：

- log：一键收集所属 OceanBase 集群的日志。
 - sysstat：一键收集所属 OceanBase 集群主机信息。
 - clog：一键收集所属 OceanBase 集群的 clog 日志。
 - slog：一键收集所属 OceanBase 集群的 slog 日志。
 - plan_monitor：一键收集所属 OceanBase 集群指定 trace_id 的并行 SQL 的执行详情信息。
 - stack：一键收集所属 OceanBase 集群的堆栈信息。
 - perf：一键收集所属 OceanBase 集群的 perf 信息。
 - obproxy_log：一键收集所属 OceanBase 集群所依赖的 ODP 的日志。
 - ash: 一键收集所属 OceanBase 集群的 ASH 信息。
 - all：一键统一收集所属 OceanBase 集群的诊断信息，包括收集 OceanBase 集群日志、主机信息、OceanBase 集群堆栈信息、OceanBase 集群 perf 信息。

## obdiag gather log

使用该命令可以一键收集所属 OceanBase 集群的日志。

#### 说明

需要确保已经在 obdiag 配置文件 `config.yml` 中配置好需要收集节点的登录信息。相关的详细配置介绍，参见 [obdiag 配置](https://www.oceanbase.com/docs/common-obdiag-cn-1000000000791119)。

```shell
obdiag gather log [options]

```

选项说明如下：

| 选项名 | 是否必选 | 数据类型 | 默认值 | 说明 |
| --- | --- | --- | --- | --- |
| –from | 否 | string | 默认为空 | 日志收集的开始时间，格式为: `yyyy-mm-dd hh:mm:ss`。 |
| –to | 否 | string | 默认为空 | 日志收集的结束时间，格式为: `yyyy-mm-dd hh:mm:ss`。 |
| –since | 否 | string | 默认为空 | 日志收集最近的某段时间，格式为: `\<n> <m\\|h\\|d>`，其中，n 表示待输入的时间数字，m 表示分钟，h 表示小时，d 表示天，例如 `30m` 表示收集最近 30 分钟的日志。 |
| –scope | 否 | string | all | 选择收集的 OceanBase 集群日志类型，可配置值为 `observer、election、rootservice、all`。 |
| –grep | 否 | string | 默认为空 | 选择查询的关键字。 |
| –encrypt | 否 | string | false | 指定回传的文件是否加密，可配置为 true 或 false，默认为 false。 |
| –store_dir | 否 | string | 默认为命令执行的当前路径 | 存储结果的本地路径。 |
| -c | 否 | string | `~/.obdiag/config.yml` | 配置文件路径 |
| –dis_update | 否 | bool | false | 自动更新开关，设置为任意值都会关闭自动更新 |

示例：

```shell
obdiag gather log --scope observer --from "2022-06-30 16:25:00" --to "2022-06-30 18:30:00" --grep STORAGE --encrypt true

...
ZipFileInfo:
+-------------------+-----------+
| Node              | LogSize   |
+===================+===========+
| xxx.xxx.xxx.xxx   | 36.184M   |
+-------------------+-----------+
...

ZipFileInfo:
+-------------------+-----------+
| Node              | LogSize   |
+===================+===========+
| xxx.xxx.xxx.xxx   | 44.176M   |
+-------------------+-----------+
...

Summary:
+-------------------+-----------+----------+------------------+--------+------------------------------------------------------------------------+
| Node              | Status    | Size     | Password         | Time   | PackPath                                                               |
+===================+===========+==========+==================+========+========================================================================+
| xxx.xxx.xxx.xxx   | Completed | 36.762M  | HYmVourcUyRNP8Om | 19 s   | gather_pack_20220701183246/result_xxx.xxx.xxx.xxx_20220701183247.zip   |
+-------------------+-----------+----------+------------------+--------+------------------------------------------------------------------------+
| xxx.xxx.xxx.xxx   | Completed | 638.200M | 1RicMaiLUUNfemnj | 718 s  | gather_pack_20220701183246/result_xxx.xxx.xxx.xxx_20220701183918.zip   |
+-------------------+-----------+----------+------------------+--------+------------------------------------------------------------------------+

```

#### 注意

如果选择加密模式，对于收集到的日志压缩的时候进行了加密处理，Password 是 zip 包解压缩的密码。默认是不加密的模式。

- 快捷收集最近一段时间的日志：

  ```shell
  # 收集最近一小时的日志
  obdiag gather log --since 1h

  # 收集最近 30 分钟的日志
  obdiag gather log --since 30m

  # 收集最近 30 分钟的日志 并且指定了配置文件
  obdiag gather log --since 30m -c /root/config.yml

  ```
 - 过滤关键字收集：

  ```shell
  # 收集最近 30 分钟的日志, 并过滤关键字 "TRACE_ID"
  obdiag gather log --grep "TRACE_ID"

  # 收集最近 30 分钟的日志, 并过滤多个关键字， 比如过滤 "AAAAA" 和 "BBBBB"
  obdiag gather log --grep "AAAAA" --grep "BBBBB"

  # 收集指定时间的日志, 并过滤多个关键字， 比如过滤 "AAAAA" 和 "BBBBB"
  obdiag gather log --from "2022-06-30 16:25:00" --to "2022-06-30 18:30:00" --grep "AAAAA" --grep "BBBBB"

  ```

#### 注意

如果采用多个关键字过滤，他们之间的关系是“与”的关系，收集的日志行同时满足多个grep中的关键字才会被收集

## obdiag gather sysstat

使用该命令可以一键收集所属 OceanBase 集群主机信息（主机 dmesg 信息、主机 CPU 信息、主机内存信息）。

```shell
obdiag gather sysstat [options]

```

选项说明如下：

| 选项名 | 是否必选 | 数据类型 | 默认值 | 说明 |
| --- | --- | --- | --- | --- |
| –store_dir | 否 | string | 默认为命令执行的当前路径 | 存储结果的本地路径。 |
| -c | 否 | string | `~/.obdiag/config.yml` | 配置文件路径 |

示例：

```shell
Example: obdiag gather sysstat

结果：

Summary:
+-------------------+-----------+---------+--------+-------------------------------------------------------------------------+
| Node              | Status    | Size    | Time   | PackPath                                                                |
+===================+===========+=========+========+=========================================================================+
| xxx.xxx.xxx.xxx   | Completed | 45.209K | 5 s    | gather_pack_20220729164233/sysstat_xxx.xxx.xxx.xxx_20220729164233.zip   |
+-------------------+-----------+---------+--------+-------------------------------------------------------------------------+
| xxx.xxx.xxx.xxx   | Completed | 42.170K | 5 s    | gather_pack_20220729164233/sysstat_xxx.xxx.xxx.xxx_20220729164233.zip   |
+-------------------+-----------+---------+--------+-------------------------------------------------------------------------+

```

## obdiag gather clog

使用 `obdiag gather clog` 会通过 obdiag 工具调用收集机器上的 ob_admin 解析 clog 文件，并对所选时间范围内的 clog 进行一键收集。

```shell
obdiag gather clog [options]

```

选项说明如下：

| 选项名 | 是否必选 | 数据类型 | 默认值 | 说明 |
| --- | --- | --- | --- | --- |
| –from | 否 | string | 默认为空 | 日志收集的开始时间，格式为: `yyyy-mm-dd hh:mm:ss`。 |
| –to | 否 | string | 默认为空 | 日志收集的结束时间，格式为: `yyyy-mm-dd hh:mm:ss`。 |
| –since | 否 | string | 默认为空 | 日志收集最近的某段时间，格式为: `\<n> <m\\|h\\|d>`，其中，n 表示待输入的时间数字，m 表示分钟，h 表示小时，d 表示天，例如 `30m` 表示收集最近 30 分钟的日志。 |
| –encrypt | 否 | string | false | 指定回传的文件是否加密，可配置为 true 或 false，默认为 false |
| –store_dir | 否 | string | 默认为命令执行的当前路径 | 存储结果的本地路径 |
| -c | 否 | string | `~/.obdiag/config.yml` | 配置文件路径 |

示例:

```shell
obdiag gather clog --from "2023-01-16 18:25:00" --to "2023-01-17 01:30:00"

Gather clog Summary:
+-------------------+-----------+---------+--------+-----------------------------------------------------------------------+
| Node              | Status    | Size    | Time   | PackPath                                                              |
+===================+===========+=========+========+=======================================================================+
| xxx.xxx.xxx.xxx   | Completed | 15.762K | 6 s    | gather_pack_20230118002457/obadmin_xxx.xxx.xxx.xxx_20230118002458.zip |
+-------------------+-----------+---------+--------+-----------------------------------------------------------------------+

```

## obdiag gather slog

使用 `obdiag gather slog` 会通过 obdiag 工具调用收集机器上的 ob_admin 解析 slog 文件，并对所选时间范围内的 slog 进行一键收集。

```shell
obdiag gather slog [options]

```

选项说明如下：

| 选项名 | 是否必选 | 数据类型 | 默认值 | 说明 |
| --- | --- | --- | --- | --- |
| –from | 否 | string | 默认为空 | 日志收集的开始时间，格式为: `yyyy-mm-dd hh:mm:ss`。 |
| –to | 否 | string | 默认为空 | 日志收集的结束时间，格式为: `yyyy-mm-dd hh:mm:ss`。 |
| –since | 否 | string | 默认为空 | 日志收集最近的某段时间，格式为: `\<n> <m\\|h\\|d>`，其中，n 表示待输入的时间数字，m 表示分钟，h 表示小时，d 表示天，例如 `30m` 表示收集最近 30 分钟的日志。 |
| –encrypt | 否 | string | false | 指定回传的文件是否加密，可配置为 true 或 false，默认为 false。 |
| –store_dir | 否 | string | 默认为命令执行的当前路径 | 存储结果的本地路径。 |
| -c | 否 | string | `~/.obdiag/config.yml` | 配置文件路径 |

示例:

```shell
obdiag gather slog --from "2023-01-16 18:25:00" --to "2023-01-17 01:30:00"

Gather slog Summary:
+-------------------+-----------+---------+--------+-----------------------------------------------------------------------+
| Node              | Status    | Size    | Time   | PackPath                                                              |
+===================+===========+=========+========+=======================================================================+
| xxx.xxx.xxx.xxx   | Completed | 15.762K | 6 s    | gather_pack_20230118002457/obadmin_xxx.xxx.xxx.xxx_20230118002458.zip |
+-------------------+-----------+---------+--------+-----------------------------------------------------------------------+

```

## obdiag gather plan_monitor

该命令可以一键收集所属 OceanBase 集群指定 trace_id 的并行 SQL 的执行详情信息，便于在 AP 场景下 SQL 执行慢时分析算子层面的原因。

#### 说明

- 该功能仅支持 OceanBase 数据库 V3.0 及以上版本。
 - 需要确保已经在 obdiag 配置文件 `config.yml` 中配置好需要收集的集群连接信息。相关的详细配置介绍，参见 [obdiag 配置](https://www.oceanbase.com/docs/common-obdiag-cn-1000000000791119)。

```shell
obdiag gather plan_monitor [options]

```

选项说明如下：

| 选项名 | 是否必选 | 数据类型 | 默认值 | 说明 |
| --- | --- | --- | --- | --- |
| –trace_id | 是 | string | 默认为空 | OceanBase 数据库 V4.0.0 以下版本可从 `gv$sql_audit` 中查看 trace_id，OceanBase 数据库 V4.0.0 及以上版本可从 `gv$ob_sql_audit` 中查看 trace_id。 |
| –store_dir | 否 | string | 默认为命令执行的当前路径 | 存储结果的本地路径。 |
| -c | 否 | string | `~/.obdiag/config.yml` | 配置文件路径 |
| –env | 否 | string | 默认为空 | 要分析的 trace_id 涉及的 SQL 所在的业务租户的连接串，主要用于获取 explain SQL 报告的 |

#### 说明

- 需要确保已经在 obdiag 配置文件 `config.yml` 中配置好需要收集的集群sys连接信息。相关的详细配置介绍，参见 [obdiag 配置](https://www.oceanbase.com/docs/common-obdiag-cn-1000000000791119)。

示例：

```shell
obdiag gather plan_monitor --trace_id YB420BA2D99B-0005EBBFC45D5A00-0-0 --env "{db_connect='-hxx -Pxx -uxx -pxx -Dxx'}"

Gather ob_admin Summary:
+-----------+--------+----------------------------------------------------------------------+
| Status    | Time   | PackPath                                                             |
+===========+========+======================================================================+
| Completed | 6 s    | gather_pack_20230118002457                                           |
+-----------+--------+----------------------------------------------------------------------+

```

## obdiag gather stack

该命令可以一键收集所属 OceanBase 集群的堆栈信息，该采集项暂不支持 ARM 版本的 OceanBase 集群 stack 信息采集。

```shell
obdiag gather stack [options]

```

选项说明如下：

示例：

```shell
Example: obdiag gather stack

结果：

Summary:
+-------------------+-----------+---------+--------+--------------------------------------------------------------------------+
| Node              | Status    | Size    | Time   | PackPath                                                                 |
+===================+===========+=========+========+==========================================================================+
| xxx.xxx.xxx.xxx   | Completed | 19.926K | 10 s   | gather_pack_20220729163951/obstack2_xxx.xxx.xxx.xxx_20220729163951.zip   |
+-------------------+-----------+---------+--------+--------------------------------------------------------------------------+
| xxx.xxx.xxx.xxx   | Completed | 22.803K | 12 s   | gather_pack_20220729163951/obstack2_xxx.xxx.xxx.xxx_20220729163951.zip   |
+-------------------+-----------+---------+--------+--------------------------------------------------------------------------+

```

## obdiag gather perf

该命令可以一键收集所属 OceanBase 集群的 perf 信息。

```shell
obdiag gather perf  [options]

```

选项说明如下：

| 选项名 | 是否必选 | 数据类型 | 默认值 | 说明 |
| --- | --- | --- | --- | --- |
| –scope | 否 | string | all | 用于选择性地收集指定的 perf 信息，可配置值为：`sample`、`flame`、`all`。 |
| –store_dir | 否 | string | 默认为命令执行的当前路径 | 存储结果的本地路径。 |
| -c | 否 | string | `~/.obdiag/config.yml` | 配置文件路径 |

示例：

```shell
obdiag gather perf

Gather Perf Summary:
+-------------------+-----------+----------+--------+----------------------------------------------------------------------+
| Node              | Status    | Size     | Time   | PackPath                                                             |
+===================+===========+==========+========+======================================================================+
| xxx.xxx.xxx.xxx   | Completed | 368.178K | 90 s   | gather_pack_20230117140836/perf_xxx.xxx.xxx.xxx_20230117140836.zip   |
+-------------------+-----------+----------+--------+----------------------------------------------------------------------+
| xxx.xxx.xxx.xxx   | Completed | 368.178K | 90 s   | gather_pack_20230117140836/perf_xxx.xxx.xxx.xxx_20230117140836.zip   |
+-------------------+-----------+----------+--------+----------------------------------------------------------------------+

```

## obdiag gather obproxy_log

使用该命令可以一键收集所属 OceanBase 集群所依赖的 ODP 的日志。

```shell
obdiag gather obproxy_log [options]

```

选项说明如下：

| 选项名 | 是否必选 | 数据类型 | 默认值 | 说明 |
| --- | --- | --- | --- | --- |
| –from | 否 | string | 默认为空 | 日志收集的开始时间，格式为: `yyyy-mm-dd hh:mm:ss`。 |
| –to | 否 | string | 默认为空 | 日志收集的结束时间，格式为: `yyyy-mm-dd hh:mm:ss`。 |
| –since | 否 | string | 默认为空 | 日志收集最近的某段时间，格式为: `\<n> <m\\|h\\|d>`，其中，n 表示待输入的时间数字，m 表示分钟，h 表示小时，d 表示天，例如 `30m` 表示收集最近 30 分钟的日志。 |
| –scope | 否 | string | all | 选择查询的 ODP 日志类型，可配置值为 `obproxy`、`obproxy_digest`、`obproxy_stat`、`obproxy_slow`、`obproxy_limit`、`all`。 |
| –grep | 否 | string | 默认为空 | 选择查询的关键字。 |
| –encrypt | 否 | string | false | 指定回传的文件是否加密，可配置为 true 或 false，默认为 false。 |
| –store_dir | 否 | string | 默认为命令执行的当前路径 | 存储结果的本地路径。 |
| -c | 否 | string | `~/.obdiag/config.yml` | 配置文件路径 |

示例：

```shell
obdiag gather obproxy_log --scope obproxy --from "2022-06-25 10:25:00" --to "2022-06-25 18:30:00" --encrypt true

...
ZipFileInfo:
+------------------+-----------+
| Node             | LogSize   |
+==================+===========+
| xxx.xxx.xxx.xxx  | 36.184M   |
+------------------+-----------+
...

Gather ObProxy Log Summary:
+-------------------+-----------+----------+------------------+--------+-----------------------------------------------------------------------------+
| Node              | Status    | Size     | Password         | Time   | PackPath                                                                    |
+===================+===========+==========+==================+========+=============================================================================+
| xxx.xxx.xxx.xxx   | Completed | 36.762M  | HYmVourcUyRNP8Om | 19 s   | gather_pack_20220701183246/obproxy_log_xxx.xxx.xxx.xxx_20220701183247.zip   |
+-------------------+-----------+----------+------------------+--------+-----------------------------------------------------------------------------+
| xxx.xxx.xxx.xxx   | Completed | 638.200M | 1RicMaiLUUNfemnj | 718 s  | gather_pack_20220701183246/obproxy_log_xxx.xxx.xxx.xxx_20220701183918.zip   |
+-------------------+-----------+----------+------------------+--------+-----------------------------------------------------------------------------+

```

## obdiag gather ash

使用该命令可以一键收集ash报告。

```shell
obdiag gather ash [options]

```

获取 ASH 相关信息需要查询 GV$ACTIVE_SESSION_HISTORY 视图获取。

选项说明如下：

| 选项名 | 是否必选 | 数据类型 | 默认值 | 说明 |
| --- | --- | --- | --- | --- |
| –from | 否 | string | 默认为空 | 采样收集的开始时间，格式为: `yyyy-mm-dd hh:mm:ss`。 |
| –to | 否 | string | 默认为空 | 采样收集的结束时间，格式为: `yyyy-mm-dd hh:mm:ss`。 |
| –trace_id | 否 | string | 默认为空 | 待采样 SQL 的 TRACE_ID，不填或填 NULL 则表示不限制 TRACE_ID。 |
| –sql_id | 否 | string | 默认为空 | 待采样 SQL 的 SQL_ID，不填或填 NULL 则表示不限制 SQL_ID。 |
| –wait_class | 否 | string | 默认为空 | 待采样的事件类型。WAIT_CLASS 取值参考 GV$ACTIVE_SESSION_HISTORY.WAIT_CLASS 字段的取值，不填或填 NULL 则表示不限制等待类型。 |
| –report_type | 否 | string | 默认为TEXT | 报告类型，目前仅支持 TEXT 类型，可不填写。 |
| –store_dir | 否 | string | 默认为命令执行的当前路径 | 存储结果的本地路径。 |
| -c | 否 | string | `~/.obdiag/config.yml` | 配置文件路径 |

示例：

```shell

obdiag gather ash

gather_ash_report start ...
gather from_time: 2024-05-13 10:59:41, to_time: 2024-05-13 11:29:41
from_time: 2024-05-13 10:59:41, to_time: 2024-05-13 11:29:41, sql_id: None, trace_id: None, report_type: TEXT, wait_class: None, store_dir: ./
save ash report file name: ./gather_pack_20240513112941/ash_report_20240513112941.txt

Gather ash_report results stored in this directory: ./gather_pack_20240513112941

Trace ID: 08acff2a-10d9-11ef-9b05-02420b9e4df1
If you want to view detailed obdiag logs, please run: obdiag display-trace 08acff2a-10d9-11ef-9b05-02420b9e4df1

```

## obdiag gather all

使用该命令可以一键统一收集所属 OceanBase 集群的诊断信息，包括收集 OceanBase 集群日志、主机信息、OceanBase 集群堆栈信息、OceanBase 集群 perf 信息。

```shell
obdiag gather all [options]

```

选项说明如下：

| 选项名 | 是否必选 | 数据类型 | 默认值 | 说明 |
| --- | --- | --- | --- | --- |
| –from | 否 | string | 默认为空 | 日志收集的开始时间，格式为: `yyyy-mm-dd hh:mm:ss`。 |
| –to | 否 | string | 默认为空 | 日志收集的结束时间，格式为: `yyyy-mm-dd hh:mm:ss`。 |
| –since | 否 | string | 默认为空 | 日志收集最近的某段时间，格式为: `\<n> <m\\|h\\|d>`，其中，n 表示待输入的时间数字，m 表示分钟，h 表示小时，d 表示天，例如 30m 表示收集最近 30 分钟的日志。 |
| –scope | 否 | string | all | 选择收集的 OceanBase 集群日志类型，可配置值为 `observer`、`election`、`rootservice`、`all`。 |
| –grep | 否 | string | 默认为空 | 选择查询的关键字。 |
| –encrypt | 否 | string | false | 指定回传的文件是否加密，可配置为 true 或 false，默认为 false。 |
| –store_dir | 否 | string | 默认为命令执行的当前路径 | 存储结果的本地路径。 |
| -c | 否 | string | `~/.obdiag/config.yml` | 配置文件路径 |

示例:

快速收集最近一段时间的集群性能报告、observer日志、主机日志、主机cpu/内存信息、observer的堆栈信息、火焰图。

```shell
obdiag gather all --from "2022-07-28 16:25:00" --to "2022-07-28 18:30:00" --encrypt true

...
ZipFileInfo:
+------------------+-----------+
| Node             | LogSize   |
+==================+===========+
| xxx.xxx.xxx.xxx  | 29.874M   |
+------------------+-----------+
...

ZipFileInfo:
+------------------+-----------+
| Node             | LogSize   |
+==================+===========+
| xxx.xxx.xxx.xxx  | 143.229M  |
+------------------+-----------+
...

...
# 指定时间段内日志收集汇总
Summary:
+-------------------+-----------+----------+------------------+--------+---------------------------------------------------------------------------------------+
| Node              | Status    | Size     | Password         | Time   | PackPath                                                                              |
+===================+===========+==========+==================+========+=======================================================================================+
| xxx.xxx.xxx.xxx   | Completed | 29.874M  | fB7FrrzTGl4EK5Hl | 20 s   | gather_pack_20220729170718/result_xxx.xxx.xxx.xxx_20220729222724_20220730003224.zip   |
+-------------------+-----------+----------+------------------+--------+---------------------------------------------------------------------------------------+
| xxx.xxx.xxx.xxx   | Completed | 143.229M | SGRbXvMyA7lrnFW1 | 74 s   | gather_pack_20220729170718/result_xxx.xxx.xxx.xxx_20220729222724_20220730003224.zip   |
+-------------------+-----------+----------+------------------+--------+---------------------------------------------------------------------------------------+

...

# observer所在主机当前时间的主机信息收集汇总
Summary:
+-------------------+-----------+---------+--------+-------------------------------------------------------------------------+
| Node              | Status    | Size    | Time   | PackPath                                                                |
+===================+===========+=========+========+=========================================================================+
| xxx.xxx.xxx.xxx   | Completed | 45.276K | 5 s    | gather_pack_20220729170856/os_info_xxx.xxx.xxx.xxx_20220729170856.zip   |
+-------------------+-----------+---------+--------+-------------------------------------------------------------------------+
| xxx.xxx.xxx.xxx   | Completed | 42.152K | 6 s    | gather_pack_20220729170856/os_info_xxx.xxx.xxx.xxx_20220729170856.zip   |
+-------------------+-----------+---------+--------+-------------------------------------------------------------------------+

# observer当前的堆栈信息
Summary:
+-------------------+-----------+---------+--------+--------------------------------------------------------------------------+
| Node              | Status    | Size    | Time   | PackPath                                                                 |
+===================+===========+=========+========+==========================================================================+
| xxx.xxx.xxx.xxx   | Completed | 22.693K | 13 s   | gather_pack_20220729170902/obstack2_xxx.xxx.xxx.xxx_20220729170902.zip   |
+-------------------+-----------+---------+--------+--------------------------------------------------------------------------+
| xxx.xxx.xxx.xxx   | Completed | 19.902K | 13 s   | gather_pack_20220729170902/obstack2_xxx.xxx.xxx.xxx_20220729170902.zip   |
+-------------------+-----------+---------+--------+--------------------------------------------------------------------------+

Gather Perf Summary:
+-------------------+-----------+----------+--------+----------------------------------------------------------------------+
| Node              | Status    | Size     | Time   | PackPath                                                             |
+===================+===========+==========+========+======================================================================+
| xxx.xxx.xxx.xxx   | Completed | 368.178K | 90 s   | gather_pack_20230117140836/perf_xxx.xxx.xxx.xxx_20230117140836.zip   |
+-------------------+-----------+----------+--------+----------------------------------------------------------------------+
| xxx.xxx.xxx.xxx   | Completed | 368.178K | 90 s   | gather_pack_20230117140836/perf_xxx.xxx.xxx.xxx_20230117140836.zip   |
+-------------------+-----------+----------+--------+----------------------------------------------------------------------+

```

```shell
# 收集最近2小时的数据
obdiag gather all --since 2h

```

 上一篇 下一篇 ![有帮助](https://gw.alipayobjects.com/mdn/ob_asset/afts/img/A*y6ocSqN8cqsAAAAAAAAAAAAAARQnAQ)![无帮助](https://gw.alipayobjects.com/mdn/ob_asset/afts/img/A*BG9IQJyLHF8AAAAAAAAAAAAAARQnAQ)![反馈](https://gw.alipayobjects.com/mdn/ob_asset/afts/img/A*eTWdQKCRKHwAAAAAAAAAAAAAARQnAQ)[AI](https://www.oceanbase.com/obi) 咨询热线
