time sync problem on Windows 2000 Advanced Server

G

Guest

Guest
Archived from groups: comp.os.ms-windows.programmer.multimedia,comp.os.ms-windows.programmer.win32,microsoft.public.win2000.multimedia,microsoft.public.win2000.advanced_server,comp.protocols.time.ntp (More info?)

Hi,

I'm having problems with time synchronisation on a dual Xeon Window
2000 Advanced Server machine.

We have a GPS clock plugged into an NTP server which is connected to
the Windows 2000 Server via ethernet via a switch. Two Windows XP
workstations are connected to the server again via the same switch.

The server uses the W32Time service to synch to the GPS (via NTP)
every two hours.

Occasionally (in fact its happend just twice so far in the space of a
month) we have found that the server will gain time by up to 5 seconds
in the space of 4 or 5 hours.

We have checked the windows event logs when this happened and can see
nothing untoward - certainly no error messages from the w32time
service.

We run two bespoke applications on the server which use
timeBeginPeriod to allow us sleep for very small periods of time
(around 2ms). Both applications call timeBeginPeriod just once at
startup of the applications. I'm not sure whether this could be
related.

This is a big problem for us as our applications need to timestamp
data to sub second accuracy.

Any help would be appreciated.

Thanks,
Chris Winstanley
 
G

Guest

Guest
Archived from groups: comp.os.ms-windows.programmer.multimedia,comp.os.ms-windows.programmer.win32,microsoft.public.win2000.multimedia,microsoft.public.win2000.advanced_server,comp.protocols.time.ntp (More info?)

In article <3b4d40d1.0408030209.76416657@posting.google.com>,
cnw@zoom.co.uk (Chris Winstanley) wrote:

> The server uses the W32Time service to synch to the GPS (via NTP)
> every two hours.

W32Time does NOT use NTP. It doesn't even claim to use NTP. What it
claims to use is SNTP (Simple NTP), which would be compatible with the
use of NTP servers if it were implemented correctly (which it isn't)
but is a lower quality protocol.

If you need quality time on Windows, you should install the reference
implementation of NTP and disable W32Time. Follow the links from
www.ntp.org; there are multiple Windows ports.

> This is a big problem for us as our applications need to timestamp
> data to sub second accuracy.

If this you are not prepared to use a full and correct NTP implementation,
you should take this up with Microsoft, as only they are in a position
to support W32Time to this level of technical detail.

Note, this posting seems rether heavily cross-posted; are you sure all
the groups are relevant?
 
G

Guest

Guest
Archived from groups: comp.os.ms-windows.programmer.multimedia,comp.os.ms-windows.programmer.win32,microsoft.public.win2000.multimedia,microsoft.public.win2000.advanced_server,comp.protocols.time.ntp (More info?)

On 3 Aug 2004 03:09:03 -0700, cnw@zoom.co.uk (Chris Winstanley) wrote:

>Hi,
>
>I'm having problems with time synchronisation on a dual Xeon Window
>2000 Advanced Server machine.
>
>We have a GPS clock plugged into an NTP server which is connected to
>the Windows 2000 Server via ethernet via a switch. Two Windows XP
>workstations are connected to the server again via the same switch.
>
>The server uses the W32Time service to synch to the GPS (via NTP)
>every two hours.
>
>Occasionally (in fact its happend just twice so far in the space of a
>month) we have found that the server will gain time by up to 5 seconds
>in the space of 4 or 5 hours.
>
>We have checked the windows event logs when this happened and can see
>nothing untoward - certainly no error messages from the w32time
>service.
>
>We run two bespoke applications on the server which use
>timeBeginPeriod to allow us sleep for very small periods of time
>(around 2ms). Both applications call timeBeginPeriod just once at
>startup of the applications. I'm not sure whether this could be
>related.
>
>This is a big problem for us as our applications need to timestamp
>data to sub second accuracy.
>
>Any help would be appreciated.
>
>Thanks,
>Chris Winstanley

I don't know what the problem is, but see tip 4167 » How do I configure the
Windows 2000 time service to log when time is adjusted? in the 'Tips & Tricks'
at http://www.jsiinc.com


Jerold Schulman
Windows: General MVP
JSI, Inc.
http://www.jsiinc.com
 
G

Guest

Guest
Archived from groups: comp.os.ms-windows.programmer.multimedia,comp.os.ms-windows.programmer.win32,microsoft.public.win2000.multimedia,microsoft.public.win2000.advanced_server,comp.protocols.time.ntp (More info?)

cnw@zoom.co.uk (Chris Winstanley) wrote in message news:<3b4d40d1.0408030209.76416657@posting.google.com>...
> Hi,
>
> I'm having problems with time synchronisation on a dual Xeon Window
> 2000 Advanced Server machine.
>
> We have a GPS clock plugged into an NTP server which is connected to
> the Windows 2000 Server via ethernet via a switch. Two Windows XP
> workstations are connected to the server again via the same switch.
>
> The server uses the W32Time service to synch to the GPS (via NTP)
> every two hours.
>
> Occasionally (in fact its happend just twice so far in the space of a
> month) we have found that the server will gain time by up to 5 seconds
> in the space of 4 or 5 hours.
>
> We have checked the windows event logs when this happened and can see
> nothing untoward - certainly no error messages from the w32time
> service.
>
> We run two bespoke applications on the server which use
> timeBeginPeriod to allow us sleep for very small periods of time
> (around 2ms). Both applications call timeBeginPeriod just once at
> startup of the applications. I'm not sure whether this could be
> related.

If you want to ensure ongoing accurate time, you should install
the NTP server (it's also a client) on the Windows box and turn
off W32Time. There are known issues with W32Time that Dave Mills
has noted. NTP will ensure accuracy over long periods of time and
ensure that the time is changed smoothly. You need to be very
careful of things like timeBeginPeriod and you really need to
understand exactly how things work before using it. You should
also ensure you call timeGetDevCaps to ensure that you are within
the timer resolution limits. These timers can very well be affected
in some way by other applications running on the same system.
Windows Media Player is well known to cause problems with things
like select() with a timeout and possibly sleep().

Danny

>
> This is a big problem for us as our applications need to timestamp
> data to sub second accuracy.
>
> Any help would be appreciated.
>
> Thanks,
> Chris Winstanley