[ntp:questions] Leap Second testing

Phil Fisher Phil.Fisher at ipaccess.com
Wed May 9 08:44:23 UTC 2012


Hi folks
Some of you may recall a question I posted several weeks ago (and to which principally Dave Hart replied) about Leap Second and a testing scenario for our systems.

I am processing this at the moment and found what seems to be interesting information, unexpected to me.

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.

So, returning to one of my original post questions, am I seeing the effect of Linux/NTP  history here?  Or is it, regretfully, just plain stupidity on my part somewhere? And even if it is stupidity, please can someone explain (via personal email if necessary) exactly how and why my stupidity occurred?

Phil.
<information>
# ntptime commands and results
$ /usr/sbin/ntptime -r
ntp_gettime() returns code 1 (INS)
  time d353c908.34ae7000  Tue, May  8 2012 17:32:08.205, (.205787),
  maximum error 383107 us, estimated error 1037 us  ntptime=d353c908.34ae7000 unixtime=4fa94a88.205787 Tue May  8 17:32:08 2012

ntp_adjtime() returns code 1 (INS)
  modes 0x0 (),
  offset 1227.000 us, frequency 57.619 ppm, interval 1 s,
  maximum error 383107 us, estimated error 1037 us,
  status 0x1 (PLL),
  time constant 6, precision 1.000 us, tolerance 512 ppm,

$ sudo /usr/sbin/ntptime -s 17
ntp_gettime() returns code 1 (INS)
  time d353c930.a1626000  Tue, May  8 2012 17:32:48.630, (.630407),
  maximum error 403587 us, estimated error 1037 us
ntp_adjtime() returns code 1 (INS)
  modes 0x10 (STATUS),
  offset 1215.000 us, frequency 57.619 ppm, interval 1 s,
  maximum error 403587 us, estimated error 1037 us,
  status 0x11 (PLL,INS),
  time constant 6, precision 1.000 us, tolerance 512 ppm,
$ /usr/sbin/ntptime -r
ntp_gettime() returns code 1 (INS)
  time d353c938.fd23d000  Tue, May  8 2012 17:32:56.988, (.988828),
  maximum error 407683 us, estimated error 1037 us  ntptime=d353c938.fd23d000 unixtime=4fa94ab8.988828 Tue May  8 17:32:56 2012

ntp_adjtime() returns code 1 (INS)
  modes 0x0 (),
  offset 1213.000 us, frequency 57.619 ppm, interval 1 s,
  maximum error 407683 us, estimated error 1037 us,
  status 0x11 (PLL,INS),
  time constant 6, precision 1.000 us, tolerance 512 ppm,

$ sudo /usr/sbin/ntptime -s 1
ntp_gettime() returns code 1 (INS)
  time d353c95c.0a4e2000  Tue, May  8 2012 17:33:32.040, (.040255),
  maximum error 426115 us, estimated error 1037 us
ntp_adjtime() returns code 1 (INS)
  modes 0x10 (STATUS),
  offset 1202.000 us, frequency 57.619 ppm, interval 1 s,
  maximum error 426115 us, estimated error 1037 us,
  status 0x1 (PLL),
  time constant 6, precision 1.000 us, tolerance 512 ppm,

# Other NTP info checked
ntpdc> sysinfo
system peer:          xxxxxx.ipaccess.com
system peer mode:     client
leap indicator:       00
stratum:              3
precision:            -20
root distance:        0.00099 s
root dispersion:      0.06125 s
reference ID:         [172.28.0.133]
reference time:       d353ec61.5dfe7016  Tue, May  8 2012 20:02:57.367
system flags:         auth monitor ntp kernel stats
jitter:               0.000351 s
stability:            0.000 ppm
broadcastdelay:       0.003998 s
authdelay:            0.000000 s

ntpq> readvar
assID=0 status=06f4 leap_none, sync_ntp, 15 events, event_peer/strat_chg,
version="ntpd 4.2.2p1 at 1.1570-o Sat Dec 19 00:58:16 UTC 2009 (1)",
processor="i686", system="Linux/2.6.18-128.el5", leap=00, stratum=3,
precision=-20, rootdelay=1.005, rootdispersion=65.252, peer=39032,
refid=172.28.0.133,
reftime=d353ec61.5dfe7016  Tue, May  8 2012 20:02:57.367, poll=10,
clock=d353f418.44749276  Tue, May  8 2012 20:35:52.267, state=4,
offset=0.767, frequency=57.638, jitter=0.425, noise=0.778,
stability=0.023, tai=0

# Final check before leaving
$ /usr/sbin/ntptime -r
ntp_gettime() returns code 1 (INS)
  time d353ff78.0b062000  Tue, May  8 2012 21:24:24.043, (.043062),
  maximum error 981562 us, estimated error 715 us  ntptime=d353ff78.b062000 unixtime=4fa980f8.043062 Tue May  8 21:24:24 2012

ntp_adjtime() returns code 1 (INS)
  modes 0x0 (),
  offset 16.000 us, frequency 57.638 ppm, interval 1 s,
  maximum error 981562 us, estimated error 715 us,
  status 0x1 (PLL),
  time constant 6, precision 1.000 us, tolerance 512 ppm,

# /var/log/messages (syslog) extracts earlier today 9 May
May  8 21:28:23 rhel006 ntpd[2531]: synchronized to 172.28.0.2, stratum 2
May  9 00:59:59 rhel006 kernel: Clock: inserting leap second 23:59:60 UTC
May  9 01:40:01 rhel006 ntpd[2531]: synchronized to 172.28.0.133, stratum 2
May  9 02:01:42 rhel006 ntpd[2531]: time reset +0.997521 s
May  9 02:05:24 rhel006 ntpd[2531]: synchronized to 172.28.0.2, stratum 2
May  9 02:12:53 rhel006 ntpd[2531]: synchronized to 172.28.0.133, stratum 2

</information>
-- 
Phil Fisher





This message contains confidential information and may be privileged. If you are not the intended recipient, please notify the sender and delete the message immediately.

ip.access Ltd, registration number 3400157, Building 2020, 
Cambourne Business Park, Cambourne, Cambridge CB23 6DW, United Kingdom


More information about the questions mailing list