---
title: "clockdiff: xx.xx.xx.xx is down-OceanBase数据库使用指南"
description: "了解OceanBase数据库在实际应用中关于clockdiff: xx.xx.xx.xx is down相关的常见问题和使用技巧，帮助您快速解决clockdiff: xx.xx.xx.xx is down的难题。"
---
切换语言

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

划线反馈

# clockdiff: xx.xx.xx.xx is down

更新时间：2026-06-08 02:41

适用版本： V2.2.x、V3.1.x、V3.2.x、V4.0.x、V4.1.x 内容类型：Troubleshoot  

## 适用版本

OAT 所有版本。

## 问题现象

clockdiff 命令报错：`clockdiff: xx.xx.xx.xx is down`。

## 解决方法

首先查看 clockdiff 的版本，命令语句如下，如果该版本过低，可能会存在 bug，建议升级到 2023 年 4 月之后的 clockdiff 版本，详情可以参考：[https://github.com/iputils/iputils/issues/326](https://github.com/iputils/iputils/issues/326)。

```shell
clockdiff -V

```

如果不存在 clockdiff 的版本问题，则可以使用下面的命令来判断时间同步误差。

- 适用 ping 命令来判断。

  ```shell
  [root@localhost ~]# ping -T tsandaddr xxx.xxx.12.7 -c 2

  ```

  返回结果如下：

  ```shell
  PING xxx.xxx.12.7 (xxx.xxx.12.7) 56(124) bytes of data.
  64 bytes from xxx.xxx.12.7: icmp_seq=1 ttl=64 time=0.146 ms
  TS:     xxx.xxx.12.123   22649606 absolute
  xxx.xxx.12.7     -15   <== 这个值代表node之间的时间差，单位是ms
  xxx.xxx.12.7     0
  xxx.xxx.12.123   15
  64 bytes from xxx.xxx.12.7: icmp_seq=2 ttl=64 time=0.172 ms
  TS:     xxx.xxx.12.123   22650627 absolute
  xxx.xxx.12.7     -14   <== 这个值代表node之间的时间差，单位是ms
  xxx.xxx.12.7     0
  xxx.xxx.12.123   14
  --- xxx.xxx.12.7 ping statistics ---
  2 packets transmitted, 2 received, 0% packet loss, time 1021ms
  rtt min/avg/max/mdev = 0.146/0.159/0.172/0.013 ms

  ```
 - 使用 strace 命令来判断。

  ```shell
  [root@localhost ~]# strace clockdiff xxx.xxx.12.7

  ```

  返回结果如下：

  ```shell
  ...
  ...
  openat(AT_FDCWD, "/etc/localtime", O_RDONLY|O_CLOEXEC) = 4
  fstat(4, {st_mode=S_IFREG|0644, st_size=582, ...}) = 0
  fstat(4, {st_mode=S_IFREG|0644, st_size=582, ...}) = 0
  read(4, "TZif2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\3\0\0\0\3\0\0\0\0"..., 4096) = 582
  lseek(4, -357, SEEK_CUR)                = 225
  read(4, "TZif2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\3\0\0\0\3\0\0\0\0"..., 4096) = 357
  close(4)                                = 0
  write(1, "\n", 1
  )                       = 1
  write(1, "host=xxx.xx.12.7 rtt=0(0)ms/0ms "..., 75host=xxx.xx.12.7 rtt=0(0)ms/0ms delta=-15ms/-14ms Tue Feb 14 14:17:27 2023
  ) = 75
  close(1)                                = 0
  close(2)                                = 0
  exit_group(0)                           = ?
  +++ exited with 0 +++

  ```

上一篇

[ntpdate 强制快速同步时间](https://www.oceanbase.com/knowledge-base/oceanbase-database-1000000000210118)

下一篇

[NTP 时钟不同步的问题排查](https://www.oceanbase.com/knowledge-base/oceanbase-database-1000000000207684) ![有帮助](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) 咨询热线
