What does "spike_detect" ntp messages mean?

环境

  • Red Hat Enterprise Linux (RHEL) 6
  • ntp

问题

  • What does "spike_detect" ntp messages mean?
  • Are the NTP servers failing? Is there any problem with the NTP client?

Raw

2014-04-10T12:05:08.000+12:00 hostname ntpd[2425]: 0.0.0.0 c515 05 clock_sync
2014-04-10T12:09:29.000+12:00 hostname ntpd[2425]: 0.0.0.0 0613 03 spike_detect -0.368888 s
2014-04-10T12:31:22.000+12:00 hostname ntpd[2425]: 0.0.0.0 061c 0c clock_step -0.371011 s

决议

  • Need to ensure there is no other things running on the system that is modifying system time apart from ntpd.

根源

  • The messages are related with the NTP synchronization. This message is logged when ntpd notice sudden change in time and it has to step the clock.

诊断步骤

  • From NTP source code:

Raw

===>>> ntp-4.2.6p5/include/ntp.h
606 /*
607  * System event codes
608  */
609 #define EVNT_UNSPEC     0       /* unspecified */
610 #define EVNT_NSET       1       /* freq not set */
611 #define EVNT_FSET       2       /* freq set */
612 #define EVNT_SPIK       3       /* spike detect */       <<<====

Raw

===>>> ntp-4.2.6p5/ntpd/ntp_loopfilter.c
  53 /*
  54  * Clock discipline state machine. This is used to control the
  55  * synchronization behavior during initialization and following a
  56  * timewarp.
  57  *
  58  *      State   < step          > step          Comments
  59  *      ========================================================
  60  *      NSET    FREQ            step, FREQ      freq not set
  61  *
  62  *      FSET    SYNC            step, SYNC      freq set
  63  *
  64  *      FREQ    if (mu < 900)   if (mu < 900)   set freq direct
  65  *                  ignore          ignore
  66  *              else            else
  67  *                  freq, SYNC      freq, step, SYNC
  68  *
  69  *      SYNC    SYNC            SPIK, ignore    adjust phase/freq
  70  *
  71  *      SPIK    SYNC            if (mu < 900)   adjust phase/freq
  72  *                                  ignore
  73  *                              step, SYNC
  74  */
  • Make sure there is no execution of ntpdate -u command while ntpd is running (via cron or manually). If ntpdate change clock, ntpd will write spike_detected messages.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值