AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / user-160397

Pietro Doninelli's questions

Martin Hope
Pietro Doninelli
Asked: 2018-09-15 16:00:29 +0800 CST

配置 NTP 后的时间漂移

  • 0

这是一个XenServer 7.1 CU1主机。NTP 的行为应该与任何其他Linux distro. 我们已经配置/etc/ntp.conf了以下服务器(已经尝试了其他具有类似结果的服务器,并且这些服务器在另一个环境中工作:

server 0.north-america.pool.ntp.org
server 1.north-america.pool.ntp.org
server 2.north-america.pool.ntp.org
server 3.north-america.pool.ntp.org

重新启动服务后,我们检查统计信息:

[root@c0101 ~]# ntpq -p
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
*tock.usshc.com  .GPS.            1 u   56   64    1   32.936   36.036   0.000
 www.tripout.tec 128.233.154.245  2 u   56   64    1   82.397   46.653   0.000
+t2.time.bf1.yah 98.139.133.62    2 u   57   64    1   17.589   26.316   0.000
 mirrors.switch. 206.108.0.134    2 u   55   64    1   63.777   57.423   0.000

从这里,我可以看到tock.usshc.com被选中(有 * 星号),轮询时间为 62 秒,由于源错误,这是最小值,偏移量很高(因为我在不同环境中检查了服务器,它只显示 -0.81 ),抖动为 0,看起来很奇怪,因为在所有情况下我都看到了至少一个低数字,例如0.1延迟看起来很正常。

大约十分钟后,由于“不良来源”,没有服务器选择(没有 * 符号),偏移和抖动看起来也很糟糕:

[root@c0101 ~]# ntpq -c peers
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
 tock.usshc.com  .GPS.            1 u   52   64  205   32.952  6021.94 4422.72
 www.tripout.tec 128.233.154.245  2 u   64   64  377   82.473  5880.01 3724.85
 t2.time.bf1.yah 98.139.133.62    2 u    3   64  377   17.812  6647.80 3704.53
 mirrors.switch. 206.108.0.134    2 u    1   64  377   63.746  6678.59 3723.43

这是 ntp 日志,我很难理解。

[root@c0101 ~]# cat /var/log/ntp.log
14 Sep 12:01:20 ntpd[3914]: ntp_io: estimated max descriptors: 1024, initial socket boundary: 16
14 Sep 12:01:20 ntpd[3914]: Listen and drop on 0 v4wildcard 0.0.0.0 UDP 123
14 Sep 12:01:20 ntpd[3914]: Listen and drop on 1 v6wildcard :: UDP 123
14 Sep 12:01:20 ntpd[3914]: Listen normally on 2 lo 127.0.0.1 UDP 123
14 Sep 12:01:20 ntpd[3914]: Listen normally on 3 xapi1 10.131.250.22 UDP 123
14 Sep 12:01:20 ntpd[3914]: Listening on routing socket on fd #20 for interface updates
14 Sep 12:01:20 ntpd[3914]: 0.0.0.0 c016 06 restart
14 Sep 12:01:20 ntpd[3914]: 0.0.0.0 c012 02 freq_set kernel 500.000 PPM
14 Sep 12:01:21 ntpd[3914]: 0.0.0.0 c61c 0c clock_step +1014.260362 s
14 Sep 12:18:15 ntpd[3914]: 0.0.0.0 c614 04 freq_mode
14 Sep 12:18:16 ntpd[3914]: 0.0.0.0 c618 08 no_sys_peer
14 Sep 12:19:39 ntpd[3914]: ntpd exiting on signal 15
14 Sep 12:19:39 ntpd[4689]: ntp_io: estimated max descriptors: 1024, initial socket boundary: 16
14 Sep 12:19:39 ntpd[4689]: Listen and drop on 0 v4wildcard 0.0.0.0 UDP 123
14 Sep 12:19:39 ntpd[4689]: Listen and drop on 1 v6wildcard :: UDP 123
14 Sep 12:19:39 ntpd[4689]: Listen normally on 2 lo 127.0.0.1 UDP 123
14 Sep 12:19:39 ntpd[4689]: Listen normally on 3 xapi1 10.131.250.22 UDP 123
14 Sep 12:19:39 ntpd[4689]: Listening on routing socket on fd #20 for interface updates
14 Sep 12:19:39 ntpd[4689]: 0.0.0.0 c016 06 restart
14 Sep 12:19:39 ntpd[4689]: 0.0.0.0 c012 02 freq_set kernel 500.000 PPM
14 Sep 12:19:40 ntpd[4689]: 0.0.0.0 c61c 0c clock_step +1.067923 s
14 Sep 12:19:41 ntpd[4689]: 0.0.0.0 c614 04 freq_mode
14 Sep 12:19:42 ntpd[4689]: 0.0.0.0 c618 08 no_sys_peer
14 Sep 12:22:58 ntpd[4689]: 0.0.0.0 c628 08 no_sys_peer
14 Sep 12:26:11 ntpd[4689]: 0.0.0.0 c638 08 no_sys_peer

以下是我也试图理解的其他输出和其他输出。ntpq -c as

我一直在使用此链接进行故障排除:http: //support.ntp.org/bin/view/Support/TroubleshootingNTP https://rags.wordpress.com/2011/10/17/how-to-debug-ntp-问题/

ntp troubleshooting
  • 2 个回答
  • 3129 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    模块 i915 可能缺少固件 /lib/firmware/i915/*

    • 3 个回答
  • Marko Smith

    无法获取 jessie backports 存储库

    • 4 个回答
  • Marko Smith

    如何将 GPG 私钥和公钥导出到文件

    • 4 个回答
  • Marko Smith

    我们如何运行存储在变量中的命令?

    • 5 个回答
  • Marko Smith

    如何配置 systemd-resolved 和 systemd-networkd 以使用本地 DNS 服务器来解析本地域和远程 DNS 服务器来解析远程域?

    • 3 个回答
  • Marko Smith

    dist-upgrade 后 Kali Linux 中的 apt-get update 错误 [重复]

    • 2 个回答
  • Marko Smith

    如何从 systemctl 服务日志中查看最新的 x 行

    • 5 个回答
  • Marko Smith

    Nano - 跳转到文件末尾

    • 8 个回答
  • Marko Smith

    grub 错误:你需要先加载内核

    • 4 个回答
  • Marko Smith

    如何下载软件包而不是使用 apt-get 命令安装它?

    • 7 个回答
  • Martin Hope
    user12345 无法获取 jessie backports 存储库 2019-03-27 04:39:28 +0800 CST
  • Martin Hope
    Carl 为什么大多数 systemd 示例都包含 WantedBy=multi-user.target? 2019-03-15 11:49:25 +0800 CST
  • Martin Hope
    rocky 如何将 GPG 私钥和公钥导出到文件 2018-11-16 05:36:15 +0800 CST
  • Martin Hope
    Evan Carroll systemctl 状态显示:“状态:降级” 2018-06-03 18:48:17 +0800 CST
  • Martin Hope
    Tim 我们如何运行存储在变量中的命令? 2018-05-21 04:46:29 +0800 CST
  • Martin Hope
    Ankur S 为什么 /dev/null 是一个文件?为什么它的功能不作为一个简单的程序来实现? 2018-04-17 07:28:04 +0800 CST
  • Martin Hope
    user3191334 如何从 systemctl 服务日志中查看最新的 x 行 2018-02-07 00:14:16 +0800 CST
  • Martin Hope
    Marko Pacak Nano - 跳转到文件末尾 2018-02-01 01:53:03 +0800 CST
  • Martin Hope
    Kidburla 为什么真假这么大? 2018-01-26 12:14:47 +0800 CST
  • Martin Hope
    Christos Baziotis 在一个巨大的(70GB)、一行、文本文件中替换字符串 2017-12-30 06:58:33 +0800 CST

热门标签

linux bash debian shell-script text-processing ubuntu centos shell awk ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve