2 Star 5 Fork 4

OceanBase / oceanbase-diagnostic-tool

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
gather_all.md 6.25 KB
一键复制 编辑 原始数据 按行查看 历史
靖顺 提交于 2023-03-13 15:58 . parse password

gather all命令

该命令用户收集集群的日志、集群性能报告、observer所在主机的信息以及observer的堆栈信息

例子:

 ./obdiag gather all -h
usage: ./obdiag gather all [-h] [--from datetime datetime] [--to datetime datetime] [--since 'n'<m|h|d>] [--ob_install_dir ob_install_dir]
                            [--store_dir store_dir] [--scope scope] [--encrypt encrypt] [--grep grep] --cluster_name cluster_name

According to the input parameters, gather all reports

optional arguments:
  -h, --help            show this help message and exit
  --from datetime datetime
                        specify the start of the time range. format: yyyy-mm-dd hh:mm:ss.
  --to datetime datetime
                        specify the end of the time range. format: yyyy-mm-dd hh:mm:ss.
  --since 'n'<m|h|d>    Specify time range that from 'n' [d]ays, 'n' [h]ours or 'n' [m]inutes. before to now. format: <n> <m|h|d>. example: 1h.
  --ob_install_dir ob_install_dir
                        the dir to ob log dir
  --store_dir store_dir
                        the dir to store gather result, current dir by default.
  --scope scope         log type constrains, choices=[observer, election, rootservice, all], default=all
  --encrypt encrypt     Whether the returned results need to be encrypted, choices=[true, false], default=false
  --grep grep           specify keywords constrain for log
  --cluster_name cluster_name
                        cluster name, awr report need

Example: ./obdiag gather all --cluster_name demo1 --from 2022-06-16 18:25:00 --to 2022-06-16 18:30:00

例子:


 ./obdiag gather all --from 2022-07-28 16:25:00 --to 2022-07-28 18:30:00 --cluster_name test --encrypt true

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

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


...
# 指定时间段内日志收集汇总
Summary:
+----------------+-----------+----------+------------------+--------+------------------------------------------------------------------------------------+
| Node           | Status    | Size     | Password         | Time   | PackPath                                                                           |
+================+===========+==========+==================+========+====================================================================================+
| 192.168.2.11   | Completed | 29.874M  | **************** | 20 s   | gather_pack_20220729170718/result_192.168.2.11_20220729222724_20220730003224.zip   |
+----------------+-----------+----------+------------------+--------+------------------------------------------------------------------------------------+
| 192.168.2.12   | Completed | 143.229M | **************** | 74 s   | gather_pack_20220729170718/result_192.168.2.12_20220729222724_20220730003224.zip   |
+----------------+-----------+----------+------------------+--------+------------------------------------------------------------------------------------+

...

# 指定时间段内性能报告收集汇总
Summary:
+--------------+-----------+--------+--------+--------------------------------------------------------------------------------------------+
| Cluster      | Status    | Size   | Time   | PackPath                                                                                   |
+==============+===========+========+========+============================================================================================+
| test         | Completed | 4.692M | 23 s   | gather_pack_20220729170833/OBAWR_obcluster_test_20220728170100_20220728180100.html         |
+--------------+-----------+--------+--------+--------------------------------------------------------------------------------------------+


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

Gather Perf Summary:
+----------------+-----------+----------+--------+-------------------------------------------------------------------+
| Node           | Status    | Size     | Time   | PackPath                                                          |
+================+===========+==========+========+===================================================================+
| 192.168.2.11   | Completed | 368.178K | 90 s   | gather_pack_20230117140836/perf_192.168.2.11_20230117140836.zip   |
+----------------+-----------+----------+--------+-------------------------------------------------------------------+
| 192.168.2.12   | Completed | 368.178K | 90 s   | gather_pack_20230117140836/perf_192.168.2.12_20230117140836.zip   |
+----------------+-----------+----------+--------+-------------------------------------------------------------------+


Gather clog Summary:
+----------------+-----------+---------+--------+----------------------------------------------------------------------+
| Node           | Status    | Size    | Time   | PackPath                                                             |
+================+===========+=========+========+======================================================================+
| 192.168.2.11   | Completed | 15.762K | 6 s    | gather_pack_20230118002457/obadmin_192.168.2.11  _20230118002458.zip |
+----------------+-----------+---------+--------+----------------------------------------------------------------------+

1
https://gitee.com/oceanbase/oceanbase-diagnostic-tool.git
git@gitee.com:oceanbase/oceanbase-diagnostic-tool.git
oceanbase
oceanbase-diagnostic-tool
oceanbase-diagnostic-tool
master

搜索帮助