Configure ntpd

NTP configuration.


This causes the ntpdate service to step the system clock in one big jump at boot time, using NTP servers tevp and cluckp respectively.

driftfile /var/lib/ntp/drift
restrict default kod nomodify notrap nopeer noquery
restrict -6 default kod nomodify notrap nopeer noquery
restrict -6 ::1
server iburst
server iburst
includefile /etc/ntp/crypto/pw
keys /etc/ntp/keys

The only non-default lines here are the two server lines, one for tevp and one for cluckp. The iburst option causes the client node to send a burst of 8 packets to the NTP server node at the first connection in order to rapidly converge the time delay calculations. With this option it can take about 15 minutes for time-setting to begin.

# Options for ntpdate
OPTIONS="-U ntp -s -b" 

# Set to 'yes' to sync hw clock after successful ntpdate

The only non-default line here is the SYNC_HWCLOCK=yes. This causes the ntpdate service to update the time in the system hardware clock chip to match what is fetched from the /etc/ntp/step-tickers NTP servers. This corrects the time drift in that chip, which typically will be a few seconds off per day.

Verify NTP configuration.

  • /usr/bin/ntpstat
synchronised to NTP server ( at stratum 4 
   time correct to within 59 ms
   polling server every 1024 s
  • /usr/sbin/ntpq -p
     remote           refid      st t when poll reach   delay   offset  jitter
+cluckp.private.  3 u  434 1024   37    0.407    1.145   0.058
*  3 u  923 1024  377    2.417   -0.122   0.416
  • /usr/sbin/ntpdc -p
     remote           local      st poll reach  delay   offset    disp
=cluckp.private.    3 1024   37 0.00040  0.001145 0.67368
*    3 1024  377 0.00241 -0.000122 0.12177