OceanBase logo

OceanBase

A unified distributed database ready for your transactional, analytical, and AI workloads.

DEPLOY YOUR WAY

OceanBase Cloud

The best way to deploy and scale OceanBase

OceanBase Enterprise

Run and manage OceanBase on your infra

TRY OPEN SOURCE

OceanBase Community Edition

The free, open-source distributed database

OceanBase seekdb

Open source AI native search database

Customer Stories

Real-world success stories from enterprises across diverse industries.

View All
BY USE CASES

Mission-Critical Transactions

Global & Multicloud Application

Elastic Scaling for Peak Traffic

Real-time Analytics

Active Geo-redundancy

Database Consolidation

Resources

Comprehensive knowledge hub for OceanBase.

Blog

Live Demos

Training & Certification

Documentation

Official technical guides, tutorials, API references, and manuals for all OceanBase products.

View All
PRODUCTS

OceanBase Cloud

OceanBase Database

Tools

Connectors and Middleware

QUICK START

OceanBase Cloud

OceanBase Database

BEST PRACTICES

Practical guides for utilizing OceanBase more effectively and conveniently

Company

Learn more about OceanBase – our company, partnerships, and trust and security initiatives.

About OceanBase

Partner

Trust Center

Contact Us

International - English
中国站 - 简体中文
日本 - 日本語
Sign In
Start on Cloud

A unified distributed database ready for your transactional, analytical, and AI workloads.

DEPLOY YOUR WAY

OceanBase Cloud

The best way to deploy and scale OceanBase

OceanBase Enterprise

Run and manage OceanBase on your infra

TRY OPEN SOURCE

OceanBase Community Edition

The free, open-source distributed database

OceanBase seekdb

Open source AI native search database

Customer Stories

Real-world success stories from enterprises across diverse industries.

View All
BY USE CASES

Mission-Critical Transactions

Global & Multicloud Application

Elastic Scaling for Peak Traffic

Real-time Analytics

Active Geo-redundancy

Database Consolidation

Comprehensive knowledge hub for OceanBase.

Blog

Live Demos

Training & Certification

Documentation

Official technical guides, tutorials, API references, and manuals for all OceanBase products.

View All
PRODUCTS
OceanBase CloudOceanBase Database
ToolsConnectors and Middleware
QUICK START
OceanBase CloudOceanBase Database
BEST PRACTICES

Practical guides for utilizing OceanBase more effectively and conveniently

Learn more about OceanBase – our company, partnerships, and trust and security initiatives.

About OceanBase

Partner

Trust Center

Contact Us

Start on Cloud
编组
All Products
    • Databases
    • iconOceanBase Database
    • iconOceanBase Cloud
    • iconOceanBase Tugraph
    • iconInteractive Tutorials
    • iconOceanBase Best Practices
    • Tools
    • iconOceanBase Cloud Platform
    • iconOceanBase Migration Service
    • iconOceanBase Developer Center
    • iconOceanBase Migration Assessment
    • iconOceanBase Admin Tool
    • iconOceanBase Loader and Dumper
    • iconOceanBase Deployer
    • iconKubernetes operator for OceanBase
    • iconOceanBase Diagnostic Tool
    • iconOceanBase Binlog Service
    • Connectors and Middleware
    • iconOceanBase Database Proxy
    • iconEmbedded SQL in C for OceanBase
    • iconOceanBase Call Interface
    • iconOceanBase Connector/C
    • iconOceanBase Connector/J
    • iconOceanBase Connector/ODBC
    • iconOceanBase Connector/NET
icon

OceanBase Diagnostic Tool

V2.4.0

  • Overview
  • Install obdiag
  • Configure obdiag
  • One-click Cluster Inspection
    • Use obdiag to inspect an OceanBase cluster
    • Inspection metrics
  • One-click Information Collection
    • One-click General Information Collection
      • obdiag gather log
      • obdiag gather sysstat
      • obdiag gather plan_monitor
      • obdiag gather stack
      • obdiag gather perf
      • obdiag gather ash
      • obdiag gather tabledump
      • obdiag gather parameter
      • obdiag gather variable
      • obdiag gather clog/obdiag gather slog
      • obdiag gather obproxy_log
      • obdiag gather all
    • One-click Scenario-based Information Collection
      • Overview
      • observer.base
      • observer.backup
      • observer.backup_clean
      • observer.clog_disk_full
      • observer.cluster_down
      • observer.compaction
      • observer.cpu_high
      • observer.delay_of_primary_and_backup
      • observer.io
      • observer.log_archive
      • observer.long_transaction
      • observer.memory
      • observer.perf_sql
      • observer.px_collect_log
      • observer.recovery
      • observer.restart
      • observer.rootservice_switch
      • observer.suspend_transaction
      • observer.unit_data_imbalance
      • observer.perf_sql
      • other.application_error
      • obproxy.restart
      • observer.unknown
  • One-click Diagnostic Analysis
    • obdiag analyze log
    • obdiag analyze flt_trace
    • obdiag analyze parameter default
    • obdiag analyze parameter diff
    • obdiag analyze variable diff
    • obdiag analyze index_space
  • One-click Root Cause Analysis
    • Use obdiag for root cause analysis
    • disconnection
    • major_hold
    • lock_conflict
    • ddl_disk_full
    • clog_disk_full
    • log_error
    • ddl_failure
    • index_ddl_error
    • transaction_disconnection
    • transaction_execute_timeout
    • transaction_not_ending
    • transaction_other_error
    • transaction_rollback
    • transaction_wait_timeout
  • Upgrade obdiag by using add-on files
  • Upgrade and uninstall obdiag
  • Telemetry Mode
  • FAQ
  • Release Notes
    • obdiag V2.4.0
    • obdiag V2.3.0
    • obdiag V2.2.0
    • obdiag V2.1.0
    • obdiag V2.0.0
    • obdiag V1.6.2
    • obdiag V1.6.1
    • obdiag V1.6.0
    • obdiag V1.5.2
    • obdiag V1.5.1
    • obdiag V1.5.0
    • obdiag V1.4.0
    • obdiag V1.3.0

Download PDF

Overview Install obdiag Configure obdiag Use obdiag to inspect an OceanBase cluster Inspection metrics obdiag gather log obdiag gather sysstat obdiag gather plan_monitor obdiag gather stack obdiag gather perf obdiag gather ash obdiag gather tabledump obdiag gather parameter obdiag gather variable obdiag gather clog/obdiag gather slog obdiag gather obproxy_log obdiag gather all Overview observer.base observer.backup observer.backup_clean observer.clog_disk_full observer.cluster_down observer.compaction observer.cpu_high observer.delay_of_primary_and_backup observer.io observer.log_archive observer.long_transaction observer.memory observer.perf_sql observer.px_collect_log observer.recovery observer.restart observer.rootservice_switch observer.suspend_transaction observer.unit_data_imbalance observer.perf_sql other.application_error obproxy.restart observer.unknown obdiag analyze log obdiag analyze flt_trace obdiag analyze parameter default obdiag analyze parameter diff obdiag analyze variable diff obdiag analyze index_space Use obdiag for root cause analysis disconnection major_hold lock_conflict ddl_disk_full clog_disk_full log_error ddl_failure index_ddl_error transaction_disconnection transaction_execute_timeout transaction_not_ending transaction_other_error transaction_rollback transaction_wait_timeout Upgrade obdiag by using add-on files Upgrade and uninstall obdiag Telemetry Mode FAQ obdiag V2.4.0 obdiag V2.3.0 obdiag V2.2.0 obdiag V2.1.0 obdiag V2.0.0 obdiag V1.6.2 obdiag V1.6.1 obdiag V1.6.0 obdiag V1.5.2 obdiag V1.5.1 obdiag V1.5.0 obdiag V1.4.0 obdiag V1.3.0
OceanBase logo

The Unified Distributed Database for the AI Era.

Follow Us
Products
OceanBase CloudOceanBase EnterpriseOceanBase Community EditionOceanBase seekdb
Resources
DocsBlogLive DemosTraining & Certification
Company
About OceanBaseTrust CenterLegalPartnerContact Us
Follow Us

© OceanBase 2026. All rights reserved

Cloud Service AgreementPrivacy PolicySecurity
Contact Us
Document Feedback
  1. Documentation Center
  2. OceanBase Diagnostic Tool
  3. V2.4.0
iconOceanBase Diagnostic Tool
V 2.4.0
  • V 3.3.0
  • V 3.2.0
  • V 3.1.0
  • V 3.0.0
  • V 2.6.0
  • V 2.5.0
  • V 2.4.0
  • V 2.3.0
  • V 1.5.0
  • V 1.4.0

Use obdiag for root cause analysis

Last Updated:2026-04-13 09:12:25  Updated
share
What is on this page
Root cause analysis commands
obdiag rca list
obdiag rca run

folded

share

If OceanBase Diagnostic Tool (obdiag) is independently deployed, you can use the obdiag rca commands to analyze the diagnostic information of OceanBase Database. These commands allow you to analyze exceptions of OceanBase Database to identify the causes that lead to these exceptions.

If your OceanBase cluster is deployed by using OceanBase Deployer (obd), you can run obdiag commands on obd to collect diagnostic information of the cluster. For more information about the commands, see obdiag commands.

Note: A large amount of internal table data is required for root cause analysis. Therefore, the tenant_sys user in the configuration file of obdiag must have the read privilege on tables and views in OceanBase Database.

Root cause analysis commands

# View supported root cause analysis scenarios
obdiag rca list 

# Perform root cause analysis based on scenarios
obdiag rca run --scene=<scene_name>

Valid values of the scene_name parameter are as follows:

  • disconnection: diagnoses disconnections based on the logs of OceanBase Database Proxy (ODP). * major_hold: diagnoses stuck major compactions.
  • lock_conflict: diagnoses lock contention.
  • ddl_disk_full: diganoses the error of insufficient disk space reported during the execution of a DDL statement.
  • transaction_disconnection: diagnoses transaction disconnections.
  • log_error: troubleshoots log-related exceptions. Currently, exceptions where no leader is present are supported.
  • transaction_not_ending: troubleshoots the issue where a transaction remains unterminated. At present, root cause analysis for this scenario is complex.
  • transaction_rollback: diagnoses transaction rollback errors.
  • transaction_execute_timeout: diagnoses timeout errors of transactions.
  • clog_disk_full: diagnoses the issue where the clog disk space is exhausted.
  • transaction_wait_timeout: diagnoses transaction wait timeout errors.
  • transaction_other_error: diagnoses other transaction errors, such as errors corresponding to errors codes -4030, -4121, -4122, -4124, and -4019.

obdiag rca list

You can run this command to query the scenarios supported for root cause analysis.

obdiag rca run

You can run this command to perform root cause analysis for a specified scenario.

obdiag rca run --scene=<scene_name>

The following table describes the options.

Option Required? Data type Default value Description
--scene No string Empty The scenario for which root cause analysis is to be performed. You can run the obd obdiag rca list command to view the list of supported scenarios.
--store_dir No string ./rca The path where the root cause analysis results are stored.
--input_parameters No string Empty The input environment variables. You can run the obd obdiag rca list command for help information.

For example, you can run the following command to analyze a disconnection:

obdiag rca run --scene=disconnection 

The output is as follows:

+-----------------------------------------------------------------------------------------------------------+
|                                                   record                                                  |
+------+----------------------------------------------------------------------------------------------------+
| step | info                                                                                               |
+------+----------------------------------------------------------------------------------------------------+
|  1   | node:xxx.xxx.xxx obproxy_diagnosis_log: [2024-01-18 17:48:37.667014] [23173][Y0-00007FAA5183E710] |
|      | [CONNECTION](trace_type="CLIENT_VC_TRACE", connection_diagnosis={cs_id:1065, ss_id:4559,           |
|      | proxy_session_id:837192278409543969, server_session_id:3221810838,                                 |
|      | client_addr:" xxx.xxx.xxx.xxx:xxxx", server_addr:" xxx.xxx.xxx.xxx:2883", cluster_name:" obcluster",     |
|      | tenant_name:" sys", user_name:" root", error_code: -10010, error_msg:" An unexpected connection event  |
|      | received from client while obproxy reading request", request_cmd:" COM_SLEEP", sql_cmd:" COM_END",   |
|      | req_total_time(us):5315316}{vc_event:" VC_EVENT_EOS", user_sql:" "})                                 |
|  2   | cs_id:1065, server_session_id:3221810838                                                           |
|  3   | trace_type:CLIENT_VC_TRACE                                                                         |
|  4   | error_code: -10010                                                                                  |
+------+----------------------------------------------------------------------------------------------------+
The suggest: Need client cooperation for diagnosis

Previous topic

obdiag analyze index_space
Last

Next topic

disconnection
Next
What is on this page
Root cause analysis commands
obdiag rca list
obdiag rca run