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
Support for CLOCK_TAI: latest ntp version?
Re: Support for CLOCK_TAI: latest ntp version?
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
Using ntp-4.2.6p5-25.el7.centos.2.x86_64May 24 13:49:37 hostname ntpd[1683]: 0.0.0.0 c01e 0e TAI 37 leap 201701010000 expire 201712010000
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
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
-
- Posts: 2
- Joined: 2017/01/26 11:36:17
Re: Support for CLOCK_TAI: latest ntp version?
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?