NTP自动退出问题排查

问题现象:ntp进程运行一段时间后自动退出


排查过程:

查看/var/log/message ntp异常信息如下

Feb 20 22:54:41 xnu_1 ntpd[2187]: 0.0.0.0 0617 07 panic_stop -28777 s; set clock manually within 1000 s.

Feb 20 22:54:57 xnu_1 ntpd_intres[2193]: parent died before we finished, exiting


查看官方文档,有如下说明:

-g

Normally, ntpd exits with a message to the system log if the offset exceeds the panic threshold, which is 1000 s by default. This option allows the time to be set to any value without restriction; however, this can happen only once. If the threshold is exceeded after that, ntpd will exit with a message to the system log. This option can be used with the -q and -x options. See the tinker command for other options.


大意就是,默认情况下如果ntp本地时间与上级ntp时间差超过1000s,那么ntp进程就会退出并在系统日志文件中记录。

可以使用tinker命令调整该阈值:

tinker [allan allan | dispersion dispersion | freq freq | huffpuff

    huffpuff | panic panic | step srep | stepout stepout]

    This command can be used to alter several system variables in

    very exceptional circumstances.  It should occur in the configu-

    ration file before any other configuration options.  The default

    values of these variables have been carefully optimized for a

    wide range of network speeds and reliability expectations. In

    general, they interact in intricate ways that are hard to predict

    and some combinations can result in some very nasty behavior.

    Very rarely is it necessary to change the default values; but,

    some folks cannot resist twisting the knobs anyway and this com-

    mand is for them. Emphasis added: twisters are on their own and

    can expect no help from the support group.


    The variables operate as follows:


    panic panic

    The argument is the panic threshold, normally 1000 s.  If

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值