[ntp:questions] Trouble Simulating Leap Seconds

Chris Walton Chris.Walton at telus.com
Wed Apr 15 15:07:20 UTC 2015


These are the exact commands that are working perfectly for me on a recently updated RHEL_6.6 system:
  service ntpd stop
  sleep  5
  ntptime -s 0
  date -u 063023452015.00
  service ntpd start

ntp.conf looks like this
  server 127.127.1.1
  fudge  127.127.1.1 stratum 1
  leapfile /etc/leapseconds
  driftfile /var/lib/ntp/drift

/etc/leapseconds looks like this:
  2272060800      10      # 1 Jan 1972
  2287785600      11      # 1 Jul 1972
  2303683200      12      # 1 Jan 1973
  2335219200      13      # 1 Jan 1974
  2366755200      14      # 1 Jan 1975
  2398291200      15      # 1 Jan 1976
  2429913600      16      # 1 Jan 1977
  2461449600      17      # 1 Jan 1978
  2492985600      18      # 1 Jan 1979
  2524521600      19      # 1 Jan 1980
  2571782400      20      # 1 Jul 1981
  2603318400      21      # 1 Jul 1982
  2634854400      22      # 1 Jul 1983
  2698012800      23      # 1 Jul 1985
  2776982400      24      # 1 Jan 1988
  2840140800      25      # 1 Jan 1990
  2871676800      26      # 1 Jan 1991
  2918937600      27      # 1 Jul 1992
  2950473600      28      # 1 Jul 1993
  2982009600      29      # 1 Jul 1994
  3029443200      30      # 1 Jan 1996
  3076704000      31      # 1 Jul 1997
  3124137600      32      # 1 Jan 1999
  3345062400      33      # 1 Jan 2006
  3439756800      34      # 1 Jan 2009
  3550089600      35      # 1 Jul 2012
  3644697600      36      # 1 Jul 2015

ntpd and its arguments looks like this:
  ntpd -u ntp:ntp -p /var/run/ntpd.pid -g (note the lack of a "-x" flag)

Here is the output of "ntptime" when run with no arguments at 23:55:
ntptime
  ntp_gettime() returns code 1 (INS)
    time d93dab0d.0028b2a8  Tue, Jun 30 2015 23:55:57.000, (.000621170),
   maximum error 18428 us, estimated error 1 us, TAI offset 35
  ntp_adjtime() returns code 1 (INS)
    modes 0x0 (),
    offset 0.000 us, frequency 13.802 ppm, interval 1 s,
    maximum error 18428 us, estimated error 1 us,
    status 0x2011 (PLL,INS,NANO),
    time constant 6, precision 0.001 us, tolerance 500 ppm,

And finally, this is the output of a perl script that spits out the time every 500ms:
  Jun 30 2015 23:59:57.398
  Jun 30 2015 23:59:57.898
  Jun 30 2015 23:59:58.398
  Jun 30 2015 23:59:58.898
  Jun 30 2015 23:59:59.398
  Jun 30 2015 23:59:59.898
  Jun 30 2015 23:59:59.399
  Jun 30 2015 23:59:59.899
  Jul 01 2015 00:00:00.399
  Jul 01 2015 00:00:00.899
  Jul 01 2015 00:00:01.399
  Jul 01 2015 00:00:01.899
  Jul 01 2015 00:00:02.399
  Jul 01 2015 00:00:02.899

-chris


More information about the questions mailing list