[ntp:questions] Leap Second testing

Dave Hart hart at ntp.org
Wed May 9 14:24:27 UTC 2012


On Wed, May 9, 2012 at 8:44 AM, Phil Fisher <Phil.Fisher at ipaccess.com> wrote:
> I was using ntptime to set the status bits for a system running a server
> (Centos 5, ntpd 4.2.2p1).  Tis allowed me to set the LI indicator and
> apparently to clear it.  The output from ntptime is shown at the end of this
> message. When I look at the syslog (/var/log/messages) I see what
> seems to be a +1 second jump at about 0200 earlier today -- my system
> runs BST (== GMT+1/UTC+1). Even more bizarre I see that a leap
> second was inserted at about 0100!
>
> Why bizarre?  Because although I had turned on the LI bit via
> ntptime/adjtimex I had also cleared it almost immediately since I was
> testing possibilities not implementation.  Subsequent checks seemed
> to show that the LI was clear in the status.  Therefore I was not expecting
> any Leap Second activity.

It appears there are two ways a pending leap insertion is indicated by
ntp_gettime/ntp_adjtime.  You were paying attention to the status word
0x10 bit.  The other way is the return value of the function.  Notice
even your last ntptime invocation reported (INS) regarding the return
values from ntp_gettime and ntp_adjtime.

No, I don't know why the two are not in sync.  I'm not particularly
worried about it, either, unless it causes a real-world problem.

Cheers,
Dave Hart


More information about the questions mailing list