کد:
http://blogs.msdn.com/w32time/archive/2008/02/26/configuring-the-time-service-ntpserver-and-specialpollinterval.aspx
One of the most talked about configuration options for W32Time has to be the list of time sources that W32Time connects to for synchronization. It is important to note that W32Time will only actively synchronize with one time source at a time, even though you are able to list more than one time source. The reason for this is simple: If your favorite time source goes down, it would be good to have a backup, or possibly a list of backups.


W32Time configures the list of time sources through the following key:


HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Servic es\W32Time\Parameters\NtpServer


The NtpServer key is a space-delimited list of time servers, either as DNS address or as IP addresses. Each server in the list can optionally have a set of flags, which are denoted as a hex value at the end of the address, separated by a comma. We will get to the flags in a moment. Here are a few examples of NtpServer values:
time.windows.com,0x01
time.windows.com,0x01 time.nist.gov,0x01 my.time.server.com,0x02
In the first example, we are specifying a time source of time.windows.com, with the 0x01 and 0x08 flags. In the second example, we are specifying 3 time sources, each with a different set of flags (0x01 & 0x08; 0x01; 0x02 respectively).
Now lets take a look at the flags. We have 4 possible flags:
• 0x01 SpecialInterval
• 0x02 UseAsFallbackOnly
• 0x04 SymmatricActive
• 0x08 Client



For 99% of cases, we only care about the first two options, so that is where we will focus. If you use the SpecialInterval flag, then you need to also set the "SpecialPollInterval" key:


HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Servic es\W32Time\TimeProviders\
NtpClient\SpecialPollInterval


Normally, W32Time will poll (make a time request) on a floating interval, based on the quality of the time samples being returned by the time source. You can however specify a static interval that the time service will syncronize on. This value is in seconds. For example, if you set a of 3600, the time service will syncronize every hour (60 minutes * 60 seconds).


The second flag is the UseAsFallbackOnly option. Setting this flag will tell the time service that you want to try every other time server specified before trying this one.

That wraps up this one. As usual, If you have specific thoughts or questions about this post, please feel free to leave a comment. For general questions about w32time, especially if you have problems with your w32time setup, I encourage you to ask them on Directory Services section of the Microsoft Technet forums




موضوعات مشابه: