Ntp

From miki
Revision as of 05:24, 5 May 2017 by Mip (talk | contribs) (Created page with "== Linux == '''ntp''' is delivered with package <tt>ntp</tt>. * Edit <tt>/etc/ntp.conf</tt> to add a server. For instance: <pre>server wbi.nxp.com iburst</pre> * Query ntp...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Linux

ntp is delivered with package ntp.

  • Edit /etc/ntp.conf to add a server. For instance:
server wbi.nxp.com iburst
  • Query ntp status:
ntpq -p                # Print active servers and status
If ntp is working, status will show (with st stratum, when number of seconds since last poll, offsetoffset in ms between our time and server time)
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
*10.137.3.254    10.137.0.254     6 u   25   64    1    0.918  111.895   1.416
When it fails,
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
 10.136.0.254    .INIT.          16 u    - 1024    0    0.000    0.000   0.000

Reference:

Windows

net time                 # Sync time
w32tm /query /status

For more information:

net help time
w32tm
# Leap Indicator: 0(no warning)
# Stratum: 4 (secondary reference - syncd by (S)NTP)
# Precision: -6 (15.625ms per tick)
# Root Delay: 0.0937500s
# Root Dispersion: 0.6016653s
# ReferenceId: 0x0A89071E (source IP:  10.137.7.30)
# Last Successful Sync Time: 5/05/2017 6:16:22
# Source: ZAVDC01.st.com
# Poll Interval: 14 (16384s)