NTP

From Exterior Memory
Jump to: navigation, search

NTP is the Network Time Protocol.

For details about the protocol, see Wikipedia, the NTP documentation or RFC 5905.

Tools

Most tools combine both the server and the client. The reason is that NTP is designed to observer time drift on a host, and get time data from multiple hosts as to achieve higher accuracy.

The most common server/client is ntpd.

If required, the ntpclient tool can be used to simply retrieve the time from a server and set the local time.

ntpq, ntptrace, and ntpdc can be used to get info about the upstream server.

 ~% ntpq -p 172.25.129.2 
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
*85.12.35.12     193.79.237.14    2 u  272  512  377   16.528    0.399   1.124
+ntp0.mediamatic 193.67.79.202    2 u  337  512  377   17.050   -0.308   5.401
+hosted.by.pcext 193.190.230.65   2 u  311  512  377   17.397    0.096   0.064
~% ntptrace 172.25.129.2
wolfje.macfreek.nl: stratum 3, offset -0.000100, synch distance 0.042799
ntp0.mediamatic.nl: stratum 2, offset -0.000069, synch distance 0.026469
ntp0.nl.uu.net: stratum 1, offset 0.000000, synch distance 0.000297, refid 'PPS'