---
title: 如何从日志中查看 OBServer 的启动过程-OceanBase数据库使用指南
description: 了解OceanBase数据库在实际应用中关于 如何从日志中查看 OBServer 的启动过程相关的常见问题和使用技巧，帮助您快速解决 如何从日志中查看 OBServer 的启动过程的难题。
---
切换语言

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

划线反馈

# 如何从日志中查看 OBServer 的启动过程

更新时间：2026-05-06 09:11

适用版本： V2.1.x、V2.2.x、V3.1.x、V3.2.x 内容类型：How-to  

本文举例说明几个重要的场景下如何搜索 OBServer 日志里的关键词。

## 适用版本

OceanBase 数据库 V2.x 和 V3.x 版本。

## 操作步骤

1. 查看 OBServer 是否启动，启动的开始。

   ```
   grep "observer is start"  observer.log

   ```

   ```
   [2023-06-27 09:00:02.995987] INFO  [SERVER] main.cpp:538 [68189][0][Y0-0000000000000000-0-0] [lt=5] observer is start(observer_version="OceanBase 3.2.4.3")
   sunxiaojie@GuNian obs_reboot % grep "observer is start"  observer.log -A 3
   [2023-06-27 09:00:02.995987] INFO  [SERVER] main.cpp:538 [68189][0][Y0-0000000000000000-0-0] [lt=5] observer is start(observer_version="OceanBase 3.2.4.3")
   [2023-06-27 09:00:02.996034] INFO  [SHARE] ob_config_manager.cpp:123 [68189][0][Y0-0000000000000000-0-0] [lt=8] Using config file(path="etc/observer.config.bin")

   ```
 2. 异步更新分区副本元数据 waiting。

   ```
   grep  "async update pg partition meta table" observer.log

   ```

   ```
   [2023-06-27 09:00:18.395526] INFO  [SERVER] ob_service.cpp:1035 [68583][Y0-0000000000000000-0-0] [T] async update pg partition meta table success(pg_partition_keys=[{tid:1100611139404081, partition_id:0, part_cnt:0}])
   [2023-06-27 09:00:18.850167] INFO  [SERVER] ob_service.cpp:1035 [68588][Y0-0000000000000000-0-0] [T] async update pg partition meta table success(pg_partition_keys=[{tid:1099511627927, partition_id:12, part_cnt:0}])

   ```
 3. 查看所有副本报告是否提交。

   ```
   grep "submit all replicas report" observer.log.20220510222850

   ```
 4. 查看 OBServer 是否初始化成功。

   ```
   grep "ob server instance init succeed"  observer.log

   ```

   ```
   [2023-06-27 09:00:07.767261] INFO  [SERVER] ob_server.cpp:379 [68189][0][Y0-0000000000000000-0-0] [lt=4] [dc=0] ob server instance init succeed
   sunxiaojie@GuNian obs_reboot % grep "ob server instance init succeed"  observer.log -A 5
   [2023-06-27 09:00:07.767261] INFO  [SERVER] ob_server.cpp:379 [68189][0][Y0-0000000000000000-0-0] [lt=4] [dc=0] ob server instance init succeed
   [2023-06-27 09:00:07.767520] INFO  ob_page_manager.cpp:57 [69722][0][Y0-0000000000000000-0-0] [lt=0] [dc=0] register pm finish(ret=0, &pm=0x7f77b1452fc0, pm.get_tid()=69722, tenant_id=500)
   [2023-06-27 09:00:07.767625] INFO  [LIB] ob_tsi_factory.h:395 [69722][0][Y0-0000000000000000-0-0] [lt=100] [dc=0] new instance succ [N9oceanbase3lib13MemoryContextE] 0x7f7ac7fc8d60 size=24, tsi=0x7f7b0e255b00

   ```
 5. 查看 OBServer 是否在 replay clog，连接时提示 Server is initializing 时，可以从下面几个关键字排查。

   ```
   grep "scan process bar" observer.log* -A 2

   ```

   ```
   [2023-06-27 09:00:15.247937] INFO  [CLOG] ob_log_scan_runnable.cpp:718 [68740][0][Y0-0000000000000000-0-0] [lt=9] [dc=0] scan process bar(curr_file_id=5, start_file_id=4, last_file_id=8, total_file_cnt=5, processed_file_cnt=2, rest_file_cnt=3, estimated_rest_time(second)=0)

   ```

      - 从 `start_file_id` 到 `last_file_id` 之间的 clog 文件需要回放。
      - `start_file_id` 是第一个需要回放的 clog 文件 ID。
      - `last_file_id` 是最后一个需要回放的 clog 文件 ID。
      - `cur_file_id` 是当前处理到的 clog 文件 ID。
      - `rest_file_cnt` 为剩余的需要回放的 clog 的个数。
      - `estimated_rest_time` 即为预计完成的时间。

   ```
   grep "clog is behind, service starting need to wait" observer.log -A 2

   ```

   ```
   [2023-06-27 09:00:24.236395] INFO  [SERVER] ob_server.cpp:2161 [68189][0][Y0-0000000000000000-0-0] [lt=7] [dc=0] [NOTICE] clog is behind, service starting need to wait !

   ```
 6. 查看 OBServer 是否提供服务 start_service_time。

   ```
   grep "server can start service" observer.log -A 2

   ```

   ```
   [2023-06-27 09:00:28.246748] INFO  [STORAGE.TRANS] ob_weak_read_service.cpp:168 [68189][0][Y0-0000000000000000-0-0] [lt=8] [dc=0] [WRS] [NOTICE] server can start service(can_start_service=true, safe_weak_read_snapshot=1687827628174382, delta=72358, pkey={tid:1099511627971, partition_id:14, part_cnt:0})
   [2023-06-27 09:00:28.246766] INFO  [SERVER] ob_server.cpp:609 [68189][0][Y0-0000000000000000-0-0] [lt=11] [dc=0] [NOTICE] observer start service(start_service_time=1687827628246760)

   ```
 7. 查看 RS 是否收到副本报告请求。

   ```
   grep "receive report replica request" observer.log

   ```

上一篇

[OceanBase RPM package on UOS failed](https://www.oceanbase.com/knowledge-base/oceanbase-database-20000048146)

下一篇

[启动 OceanBase 数据库时 -o 内的参数是否会持久化](https://www.oceanbase.com/knowledge-base/oceanbase-database-1000000000210130) ![有帮助](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) 咨询热线
