linux 6 ntp,linux – 在RHEL6上使用时钟转换启用NTP

如果时钟关闭,NTPD可以以慢速增量调整时钟.这背后的想法是缓慢的步骤不会导致软件定时器问题,日志文件和数据等奇怪的差距.

The maximum slew rate possible is limited to 500 parts-per-million (PPM) by the Unix kernel. As a result,the clock can take 2000s for each second the clock is outside the acceptable range.

根据手册页,如果您的时钟超过1000秒,ntpd将无法工作. (虽然您可以使用-g开关调整,慢慢补偿1000秒的偏移量已经超过3周.)

其次,当您启动ntpd时,您观察到的时间跳跃是ntpd启动时偏移量大于128 ms时默认ntpd行为的步骤而不是转换时钟的结果.当ntpd在启动时启动但在运行的系统上不是您想要的时候这是有意义的.

您可以通过将-x开关添加到ntpd的启动选项来防止这种情况.从手册:

-x

Normally,the time is slewed if the offset is less than the step threshold,which is 128 ms by default,and stepped if above the threshold. This option sets the threshold to 600 s,which is well

within the accuracy window to set the clock manually. Note: Since the slew rate of typical Unix kernels is limited to 0.5 ms/s,each second of adjustment requires an amortization interval of 2000 s Thus,an adjustment as much as 600 s will take almost 14 days to complete. This option can be used with the -g and -q options

在RHEL系统中,可以在启动ntpd服务之前调整/ etc / sysconfig / ntpd配置文件:

# /etc/sysconfig/ntpd

# Drop root to id 'ntp:ntp' by default.

OPTIONS="-u ntp:ntp -p /var/run/ntpd.pid -g -x"

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值