OceanBase
English日本語简体中文
Docs Home
Products
Integrations
Release Notes

Databases

OceanBase DatabaseOceanBase Cloud OceanBase Best Practices

Tools

OceanBase Cloud PlatformOceanBase Migration ServiceOceanBase Developer CenterOceanBase Migration AssessmentOceanBase Admin ToolOceanBase Loader and DumperOceanBase DeployerKubernetes operator for OceanBaseOceanBase Diagnostic Tool OceanBase Binlog Service

Connectors and Middleware

OceanBase Database Proxy OceanBase Connector/C OceanBase Connector/J OceanBase Connector/ODBC OceanBase Connector/NETOceanBase Command-Line Client

Databases

OceanBase DatabaseOceanBase Cloud OceanBase Best Practices

Connectors and Middleware

OceanBase Database Proxy OceanBase Connector/C OceanBase Connector/J OceanBase Connector/ODBC OceanBase Connector/NETOceanBase Command-Line Client

Tools

OceanBase Cloud PlatformOceanBase Migration ServiceOceanBase Developer CenterOceanBase Migration AssessmentOceanBase Admin ToolOceanBase Loader and DumperOceanBase DeployerKubernetes operator for OceanBaseOceanBase Diagnostic Tool OceanBase Binlog Service
OceanBase DatabaseOceanBase Cloud ToolsConnectors and MiddlewareLifecycle Support Policy

OceanBase Deployer

V4.3.0Community Edition
  • What is obd
  • Quick Start
    • Install obd
    • Quick deployment of OceanBase Database
    • Quickly deploy OCP
  • obd Command
    • Quick deployment commands
    • Cluster commands
    • Command groups
    • Image and repository commands
    • Test command groups
    • Tool commands
    • obdiag commands
    • Binlog service commands
    • Hardware commands
    • License commands
    • Password commands
    • Telemetry commands
  • User Guide
    • Usage overview
    • Deploy through GUI
      • Overview
      • Pattern configuration rules
      • Deploy an OceanBase cluster
      • Deploy OCP
      • Deploy OMS
      • Change components
      • Upgrade OCP
      • Upgrade OMS
    • Deploy through CLI
      • Configuration file
      • Component deployment
        • Deploy an OceanBase cluster
        • Deploy seekdb
        • Deploy obconfigserver
        • Deploy OMS
        • Deploy OCP
        • Deploy Alertmanager
        • Deploy obbinlog
        • Deploy oblogproxy
      • Cluster management
        • Physical Standby Database
          • Create a standby tenant
          • Role switching and decoupling
          • Switch the synchronization mode between primary and standby tenants
        • seekdb primary/standby instance
          • Create a standby instance
          • Role switching and decoupling
        • Scale out and component changes
        • Performance test
        • Diagnose a cluster
        • Backup and restore
        • Add a GUI monitoring system to an existing cluster
      • Cluster management
        • Use OCP to take over an OceanBase cluster deployed by obd
        • Take over an OceanBase cluster
      • Component upgrade
        • Upgrade OceanBase Database
        • Upgrade ODP
        • Upgrade OMS
  • Upgrade obd
  • FAQ
  • Error codes
  • Release Notes
    • Version rules
    • V4.3
      • OceanBase Deploy V4.3.0
    • V4.2
      • OceanBase Deployment Tool V4.2.0
    • V4.1
      • OceanBase Deployer V4.1.0
    • V4.0
      • OceanBase Deployer V4.0.0
    • V3.6
      • OceanBase Deployer V3.6.0
    • V3.5
      • OceanBase Deployer V3.5.0
    • V3.4
      • OceanBase Deployer V3.4.0
    • V3.3
      • OceanBase Deployer V3.3.0
    • V3.2
      • OceanBase Deployer V3.2.2
      • OceanBase Deployer V3.2.1
      • OceanBase Deployer V3.2.0
    • V3.1
      • OceanBase Deployer V3.1.2
      • OceanBase Deployer V3.1.1
      • OceanBase Deployer V3.1.0
    • V3.0
      • OceanBase Deployer V3.0.1
      • OceanBase Deployer V3.0.0
    • V2.10
      • OceanBase Deployer V2.10.1
      • OceanBase Deployer V2.10.0
    • V2.9
      • OceanBase Deployer V2.9.2
      • OceanBase Deployer V2.9.1
      • OceanBase Deployer V2.9.0
    • V2.8
      • OceanBase Deployment Tool V2.8.0
    • V2.7
      • OceanBase Deployment Tool V2.7.0
    • V2.6
      • OceanBase Deployment Tool V2.6.2
      • OceanBase Deployment Tool V2.6.1
      • OceanBase Deployment Tool V2.6.0
    • V2.5
      • OceanBase Deployer V2.5.0
    • V2.4
      • OceanBase Deployer V2.4.0
    • V2.3
      • OceanBase Deployment Tool V2.3.1
      • OceanBase Deployer V2.3.0
    • V2.2
      • OceanBase Deployment Tool V2.2.0
    • V2.1
      • OceanBase Deployer V2.1.1
      • OceanBase Deployment Tool V2.1.0
    • V2.0
      • OceanBase Deployment Tool V2.0.1
      • OceanBase Deployment Tool V2.0.0
    • V1.6
      • OceanBase Deployer V1.6.2
      • OceanBase Deployer V1.6.1
      • OceanBase Deployer V1.6.0
    • V1.5
      • OceanBase Deployer V1.5.0
    • V1.4
      • OceanBase Deployer V1.4.0
    • V1.3
      • OceanBase Deployer V1.3.3
      • OceanBase Deployer V1.3.2
      • OceanBase Deployer V1.3.0
    • V1.2
      • OceanBase Deployer V1.2.1
      • OceanBase Deployer V1.2.0
  • Interactive deployment of OceanBase Database Community Edition
  • Deploy a Community Edition cluster using the obd graphical interface
  • Deploy a Community Edition cluster by using an obd configuration file

Download PDF

Document Feedback
  1. Documentation Center
  2. OceanBase Deployer
  3. V4.3.0

obdiag commands

Last Updated:2026-09-04 08:21:29

Examples

OceanBase Diagnostic Tool (obdiag) is a command-line diagnostic tool for OceanBase Database. obdiag can scan, collect, and analyze logs, SQL audit records, and process stack traces of OceanBase Database. It can be used to perform one-click diagnostics on OceanBase clusters deployed in different modes, such as OCP, obd, or manually deployed by users. obdiag is open source. For more information, see obdiag GitHub repository.

obd integrates obdiag and allows you to perform one-click diagnostics by running the obd obdiag command. After you run the obd tool install obdiag command to install obdiag, you can use it. The options that you need to configure when you run the obd obdiag command are the same as those for obdiag. The difference is that you need to add the obd field before the obdiag field and specify the cluster deployment name in the command. You can run the obd cluster list command to view the cluster deployment names. The Name column in the output indicates the cluster deployment name. For example, you can run the obd obdiag rca run <deploy_name> command.

Note

The obd obdiag command can be used only to operate on clusters managed by obd. By default, clusters deployed by obd are managed by obd. You can take over non-obd-deployed clusters. For more information, see Take over a cluster by using obd.

Examples

Note

This topic describes only some simple operations. For more examples, see Diagnose a cluster.

  1. Install obdiag.

    obd tool install obdiag
    source ~/oceanbase-diagnostic-tool/init.sh
    
  2. View the list of clusters managed by obd.

    obd cluster list
    

    The output is as follows:

    +------------------------------------------------------------------+
    |                          Cluster List                            |
    +-------------+----------------------------------+-----------------+
    | Name        | Configuration Path               | Status (Cached) |
    +-------------+----------------------------------+-----------------+
    | obtest      | /home/admin/.obd/cluster/obtest  | running         |
    | demo        | /home/admin/.obd/cluster/demo    | running         |
    +-------------+----------------------------------+-----------------+
    
  3. Collect cluster logs.

    The following example collects logs of the obtest cluster in the last 30 minutes and searches for the keyword STORAGE in the observer logs.

    obd obdiag gather log obtest --since=30m --scope observer --grep STORAGE 
    

    The output is as follows:

    Open ssh connection ok
    obdiag version: 3.6.0
    gather_log start ...
    gather log from_time: 2025-08-07 17:00:16, to_time: 2025-08-07 17:31:16
    gather start ok
    +-----------------------------------------------------------------------------------------------------------------------------------------------------------+
    |                                                    Gather observer Log Summary on 2025-08-07 17:30:17                                                     |
    +------------+---------+--------+---------------------------------------------------------------------------------------------------------------------------+
    |  Node      |  Status |  Size  |                                                            info                                                           |
    +------------+---------+--------+---------------------------------------------------------------------------------------------------------------------------+
    | 10.10.10.2 | Success | 3.389M | file save in ./obdiag_gather_pack_20250807173016/observer_log_local_20250807170016_20250807173116_696697_pid_11453.tar.gz |
    +------------+---------+--------+---------------------------------------------------------------------------------------------------------------------------+
    
    For result details, please run cmd ' cat ./obdiag_gather_pack_20250807173016/result_summary.txt '
    
    Trace ID: 2096447e-7371-11f0-8219-00163e56c732
    If you want to view detailed obdiag logs, please run: /home/admin/.obd/repository/oceanbase-diagnostic-tool/3.6.0/3dc41c5f31647397b7cf32c50af1b7508a84bf3e/   obdiag display-trace 2096447e-7371-11f0-8219-00163e56c732
    
    See **OceanBase Deployer error codes** .
    Trace ID: 1ff1ff90-7371-11f0-a5b3-00163e56c732
    If you want to view detailed obd logs, please run: obd display-trace 1ff1ff90-7371-11f0-a5b3-00163e56c732
    

Previous topic

Tool commands
Last

Next topic

Binlog service commands
Next
on this page
Examples