用 chronyc 检查系统时间同步状态

确认 chrony 是否在正常校准系统时间,以及正在使用哪些 NTP 服务器。

Linux时间同步诊断chrony 时间同步低风险
运行 chronyc tracking 查看整体同步状态,再运行 chronyc sources -v 查看每台 NTP 服务器是否可达。

01命令

命令
$ chronyc tracking && chronyc sources -v

02作用说明

chronyc tracking 会显示时钟偏差(Last offset)、层级(stratum)以及是否有闰秒待处理。chronyc sources -v 列出已配置的服务器——标有 ^* 的是当前正在同步的服务器,Reach 列应显示类似 377 的非零值。如果没有选中任何服务器,说明 NTP 服务连不上上游。

03风险

风险低风险
使用条件chrony installed and running (default on RHEL/Fedora/Ubuntu Server). On systemd-timesyncd systems use timedatectl instead.
!注意: 如果 Last offset 一直很大不收敛,通常是防火墙拦了 UDP 123 端口或网络封了 NTP。该命令只读,随时可以运行。

04撤销

✓无需撤销——该命令不会改变持久状态。

05来源

  • chronyc(1) - command-line interface for chrony
    Ubuntu Manpages · community · 2026-09-17
    依据: chronyc tracking reports system time, last offset and stratum; chronyc sources shows the NTP servers chrony is using and their reach/state.
  • chrony documentation
    chrony project · community · 2026-09-17
    依据: Official documentation for the tracking and sources commands and the meaning of Leap/Stratum/Root delay fields.

最后验证: 2026-09-18 · 分类: 系统与设置

06相关方案