[ntp:questions] Time sync between Win2k3 and Suse Linux

Martin Burnicki martin.burnicki at meinberg.de
Tue Feb 19 12:31:22 UTC 2008


Frett wrote:
> Hello NG,
> i got a quite annoying problem on some of our sites.
> Our system consists of a Windows Machine (Win2k3 Server) and a Suse
> Linux Machine (Usually SLES8 oder 9).
> We got NTP running on the Linux machine pointing on the Windows to get
> the time from there.

Do you have w32time or ntpd running on the Windows machine?

> But on most of the sites the driftfile shows nothing and the ntpq -p
> also show only a minimum delay:
> Suse1:~ # ntpq -p
>    remote    refid  st t when poll reach   delay   offset  jitter
> =================================================================
>  Winmachine  .LOCL.  1 u   53   64    3    0.202   10.971   9.382

The only proble I see here is that "reach" is only 3, which means the client
has only queried the server twice. Since the poll interval is 64 and this
means ntpd is running only for about 3 minutes.

Please wait some time more, e.g. 30 minutes, and then see what "ntpq -p"
reports. The drift file is only created after ntpd has been able to
determine the drift correctly, which takes much longer than 3 minutes.

> Suse1:~ # cat /var/lib/ntp/drift/ntp.drift
> 0.000

This looks like the driftfile has been created with 0.000 in it which is bad
practice since ntpd would assume it had determined a drift of 0.000
earklier, and then apply that value to the kernel clock at start.

> After doing a rcxntpd -restart everything is fine again. But it
> proceeds differing after that.

Please re-check after ntpd has been running for some longer time.

> The NTP config is the following:
> ........
> ##
> ## Undisciplined Local Clock. This is a fake driver intended for
> backup
> ## and when no outside source of synchronized time is available.
> ##
> server (This is the IP of the Windows)

You should add the "iburst" keyword to the line above in order to speed up
initial synchronization, i.e.:

server iburst  #(This is the IP of the Windows)

There is no "server" entry for the "local clock", so the line below is
obsolete and should be removed.

> fudge stratum 10   # LCL is unsynchronized
> ##
> ## Outside source of synchronized time
> ##
> ## server xx.xx.xx.xx           # IP address of server
> ##
> ## Miscellaneous stuff
> ##
> driftfile /var/lib/ntp/drift/ntp.drift # path for drift file
> logfile   /var/log/ntp          # alternate log file
> ##
> ...........
> Even when we got a clustersystem it?s all the same. The 2 SuseMachines
> are running in the same time and the 2 Windowsmachines running in the
> same time, but Win and Suse differ.

>    remote    refid  st t when poll reach   delay   offset  jitter
> =================================================================
>  Winmachine  .LOCL.  1 u   53   64    3    0.202   10.971   9.382

The offset here is 10 milliseconds, and the jitter 9 milliseconds. Taking
into account that the Windows system time increments in 16 ms steps this is
not too bad.

> Easiest solution would be maybe to create a cronjob and restart the
> ntp all day, but would appreciate any help if i got any wrong
> configuration or i missed something.

Formerly it has been called a bad idea to run Windows as a time server and
Linux as a client. The better configuration would be the other way round.
This is due to the limited resolution of the Windows system clock (16 ms as
mentioned above).

In the Linux syslog file, are there repeatedly entries saying "ntpd: time
reset"? A single entry after ntpd start is OK, however, those messages in
regular intervals are not.

Martin Burnicki

Meinberg Funkuhren
Bad Pyrmont

More information about the questions mailing list