Support for CLOCK_TAI: latest ntp version?

Issues related to applications and software problems
Post Reply
PhilipBTaylor
Posts: 2
Joined: 2017/01/26 11:36:17

Support for CLOCK_TAI: latest ntp version?

Post by PhilipBTaylor » 2017/05/24 12:06:31

I would like to use CLOCK_TAI with clock_gettime() on CentOS 7. But the default clock offset is zero seconds and so it does not return the correct TAI time. To get this to work properly needs support from ntp software, in particular the leapfile directive in the ntp.conf file.

Is there a version of ntp available for CentOS 7 that properly supports leap second handling: I think it has to be >4.2.6. yum currently provides ntp V4.2.6p5. I have not been able to build more recent versions of ntp from source under CentOS 7.


Philip

User avatar
TrevorH
Site Admin
Posts: 33216
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Support for CLOCK_TAI: latest ntp version?

Post by TrevorH » 2017/05/24 12:52:34

It's supported in the ntp package that we supply. I just fetched the leap-seconds.3701462400 file from tycho.usno.navy.mil and copied it to /etc/ntp/ then added leapfile /etc/ntp/leap-seconds.3701462400 to /etc/ntp.conf and restarted ntpd. In /var/log/messages I see
May 24 13:49:37 hostname ntpd[1683]: 0.0.0.0 c01e 0e TAI 37 leap 201701010000 expire 201712010000
Using ntp-4.2.6p5-25.el7.centos.2.x86_64
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

PhilipBTaylor
Posts: 2
Joined: 2017/01/26 11:36:17

Re: Support for CLOCK_TAI: latest ntp version?

Post by PhilipBTaylor » 2017/05/24 16:45:01

This sounds good, obviously I was misinformed about the ntp 4.2.6 features. Is there a way of automating the leap seconds update? There is a command called "update-leap" provided with a recent version of ntp?

Post Reply