Windows Time Service Tools and Settings
In this section
If you are implementing a new domain controller or external time device to handle time synchronization, see Configuring a time source for the forest (http://go.microsoft.com/fwlink/?LinkId=111146). Windows Time Service ToolsThe following tools are associated with the Windows Time service. W32tm.exe: Windows TimeCategory This tool is installed as part of Windows XP and Windows Server 2003 default installations. Version compatibility This tool works on Windows XP and Windows Server 2003. W32tm.exe is used to configure Windows Time service settings. It can also be used to diagnose problems with the time service. W32tm.exe is the preferred command line tool for configuring, monitoring, or troubleshooting the Windows Time service. The following tables describe the parameters used with W32tm.exe. W32tm.exe Primary Parameters
For more information about W32tm.exe, see Help and Support Center in Windows XP or Windows Server 2003. Windows Time Service Registry EntriesThe following registry entries are associated with the Windows Time service. This information is provided as a reference for use in troubleshooting or verifying that the required settings are applied. It is recommended that you do not directly edit the registry unless there is no other alternative. Modifications to the registry are not validated by the registry editor or by Windows before they are applied, and as a result, incorrect values can be stored. This can result in unrecoverable errors in the system. When possible, use Group Policy or other Windows tools, such as Microsoft Management Console (MMC), to accomplish tasks rather than editing the registry directly. If you must edit the registry, use extreme caution. Many registry entries for the Windows Time service are the same as the Group Policy setting of the same name. The Group Policy settings correspond to the registry entries of the same name located in: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\. There are several registry keys at this registry location. The Windows Time settings are stored in values across all of these keys. Note
The following registry entries are located under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\ AllowNonstandardModeCombinationsRegistry pathHKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpServer VersionWindows XP and Windows Server 2003 This entry indicates that non-standard mode combinations are allowed in synchronization between peers. The default value for domain members is 1. The default value for stand-alone clients and servers is 1. AllowNonstandardModeCombinationsRegistry pathHKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpClient VersionWindows XP and Windows Server 2003 This entry indicates that non-standard mode combinations are allowed in synchronization between clients and servers. The default value for domain members is 1. The default value for stand-alone clients and servers is 1. AnnounceFlagsRegistry pathHKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Config VersionWindows XP and Windows Server 2003 This entry controls whether this computer is marked as a reliable time server. A computer is not marked as reliable unless it is also marked as a time server.
The default value for domain members is 10. The default value for stand-alone clients and servers is 10. CompatibilityFlagsRegistry pathHKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpClient VersionWindows XP and Windows Server 2003 This entry specifies the following compatibility flags and values:
The default value for domain members is 0x80000000. The default value for stand-alone clients and servers is 0x80000000. CrossSiteSyncFlagsRegistry pathHKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpClient VersionWindows XP and Windows Server 2003 This entry determines whether the service chooses synchronization partners outside the domain of the computer. The options and values are:
This value is ignored if the NT5DS value is not set. The default value for domain members is 2. The default value for stand-alone clients and servers is 2. DllNameRegistry pathHKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpClient VersionWindows XP and Windows Server 2003 This entry specifies the location of the DLL for the time provider. The default location for this DLL on both domain members and stand-alone clients and servers is windir\System32\W32Time.dll. DllNameRegistry path HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpServer Version Windows Server 2003 This entry specifies the location of the DLL for the time provider. The default location for this DLL on both domain members and stand-alone clients and servers is windir \System32\W32Time.dll. EnabledRegistry pathHKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpClient VersionWindows XP and Windows Server 2003 This entry indicates if the NtpClient provider is enabled in the current Time Service.
The default value on domain members is 1. The default value on stand-alone clients and servers is 1. EnabledRegistry pathHKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpServer VersionWindows XP and Windows Server 2003 This entry indicates if the NtpServer provider is enabled in the current Time Service.
The default value on domain members is 1. The default value on stand-alone clients and servers is 1. EventLogFlagsRegistry pathHKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Config VersionWindows XP and Windows Server 2003 This entry controls the events that the time service logs.
The default value on domain members is 2. The default value on stand-alone clients and servers is 2. EventLogFlagsRegistry pathHKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpClient VersionWindows XP and Windows Server 2003 This entry specifies the events logged by the Windows Time service.
The default value on domain members is 0x1. The default value on stand-alone clients and servers is 0x1. FrequencyCorrectRateRegistry pathHKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Config VersionWindows XP and Windows Server 2003 This entry controls the rate at which the clock is corrected. If this value is too small, the clock is unstable and overcorrects. If the value is too large, the clock takes a long time to synchronize. The default value on domain members is 4. The default value on stand-alone clients and servers is 4. Note
HoldPeriodRegistry pathHKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Config VersionWindows XP and Windows Server 2003 This entry controls the period of time for which spike detection is disabled in order to bring the local clock into synchronization quickly. A spike is a time sample indicating that time is off a number of seconds, and is usually received after good time samples have been returned consistently. The default value on domain members is 5. The default value on stand-alone clients and servers is 5. InputProviderRegistry pathHKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpClient VersionWindows XP and Windows Server 2003 This entry indicates if the NtpClient provider is enabled.
The default value on domain members is 1. The default value on stand-alone clients and servers is 1. InputProviderRegistry pathHKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpServer VersionWindows XP and Windows Server 2003 This entry indicates if the NtpServer provider is enabled.
The default value on domain members is 1. The default value on stand-alone clients and servers is 1. LargePhaseOffsetRegistry pathHKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Config VersionWindows XP and Windows Server 2003 This entry specifies that a time offset greater than or equal to this value in 10-7 seconds is considered a spike. A network disruption such as a large amount of traffic might cause a spike. A spike will be ignored unless it persists for a long period of time. The default value on domain members is 50000000. The default value on stand-alone clients and servers is 50000000. LargeSampleSkewRegistry pathHKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpClient VersionWindows Server 2003 This entry specifies the large sample skew for logging in seconds. To comply with Security and Exchange Commission (SEC) specifications, this should be set to three seconds. Events will be logged for this setting only when EventLogFlags is explicitly configured for 0x2 large sample skew. The default value on domain members is 3. The default value on stand-alone clients and servers is 3. LastClockRateRegistry pathHKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Config VersionWindows XP and Windows Server 2003 This entry is maintained by W32Time. It contains reserved data that is used by the Windows operating system, and any changes to this setting can cause unpredictable results. The default value on domain members is 156250. The default value on stand-alone clients and servers is 156250. LocalClockDispersionRegistry pathHKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Config VersionWindows XP and Windows Server 2003 This entry controls the dispersion (in seconds) that you must assume when the only time source is the built-in CMOS clock. The default value on domain members is 10. The default value on stand-alone clients and servers is 10. MaxAllowedPhaseOffsetRegistry pathHKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Config VersionWindows XP and Windows Server 2003 This entry specifies the maximum offset (in seconds) for which W32Time attempts to adjust the computer clock by using the clock rate. When the offset exceeds this rate, W32Time sets the computer clock directly. The default value for domain members is 300. The default value for stand-alone clients and servers is 1. In order for W32Time to set the computer clock gradually, the offset must be less than the MaxAllowedPhaseOffset value and satisfy the following equation at the same time: |CurrentTimeOffset| / (PhaseCorrectRate*UpdateInterval) < SystemClockRate / 2 MaxClockRateRegistry pathHKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Config VersionWindows XP and Windows Server 2003 This entry is maintained by W32Time. It contains reserved data that is used by the Windows operating system, and any changes to this setting can cause unpredictable results. The default value for domain members is 155860. The default value for stand-alone clients and servers is 155860. MaxNegPhaseCorrectionRegistry pathHKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Config VersionWindows XP and Windows Server 2003 This entry specifies the largest negative time correction in seconds that the service makes. If the service determines that a change larger than this is required, it logs an event instead. Special case: 0xFFFFFFFF means always make time correction. The default value for domain members is 0xFFFFFFFF. The default value for stand-alone clients and servers is 54,000 (15 hrs). MaxPollIntervalRegistry pathHKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Config VersionWindows XP and Windows Server 2003 This entry specifies the largest interval, in log2 seconds, allowed for the system polling interval. Note that while a system must poll according to the scheduled interval, a provider can refuse to produce samples when requested to do so. The default value for domain controllers is 10. The default value for domain members is 15. The default value for stand-alone clients and servers is 15. MaxPosPhaseCorrectionRegistry pathHKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Config VersionWindows XP and Windows Server 2003 This entry specifies the largest positive time correction in seconds that the service makes. If the service determines that a change larger than this is required, it logs an event instead. Special case: 0xFFFFFFFF means always make time correction. The default value for domain members is 0xFFFFFFFF. The default value for stand-alone clients and servers is 54,000 (15 hrs). MinClockRateRegistry pathHKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Config VersionWindows XP and Windows Server 2003 This entry is maintained by W32Time. It contains reserved data that is used by the Windows operating system, and any changes to this setting can cause unpredictable results. The default value for domain members is 155860. The default value for stand-alone clients and servers is 155860. MinPollIntervalRegistry pathHKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Config VersionWindows XP and Windows Server 2003 This entry specifies the smallest interval, in log2 seconds, allowed for the system polling interval. Note that while a system does not request samples more frequently than this, a provider can produce samples at times other than the scheduled interval. The default value for domain controllers is 6. The default value for domain members is 10. The default value for stand-alone clients and servers is 10. NtpServerRegistry pathHKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Parameters VersionWindows Server 2003 This entry specifies a space-delimited list of peers from which a computer obtains time stamps, consisting of one or more DNS names or IP addresses per line. Each DNS name or IP address listed must be unique. Computers connected to a domain must synchronize with a more reliable time source, such as the official U.S. time clock.
There is no default value for this registry entry on domain members. The default value on stand-alone clients and servers is time.microsoft.com,0x1. PhaseCorrectRateRegistry pathHKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Config VersionWindows XP and Windows Server 2003 This entry controls the rate at which the phase error is corrected. Specifying a small value corrects the phase error quickly, but might cause the clock to become unstable. If the value is too large, it takes a longer time to correct the phase error. The default value on domain members is 1. The default value on stand-alone clients and servers is 7. Note
PollAdjustFactorRegistry pathHKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Config VersionWindows XP and Windows Server 2003 This entry controls the decision to increase or decrease the poll interval for the system. The larger the value, the smaller the amount of error that causes the poll interval to be decreased. The default value on domain members is 5. The default value on stand-alone clients and servers is 5. ResolvePeerBackOffMaxTimesRegistry pathHKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpClient VersionWindows XP and Windows Server 2003 This entry specifies the maximum number of times to double the wait interval when repeated attempts to locate a peer to synchronize with fail. A value of zero means that the wait interval is always the minimum. The default value on domain members is 7. The default value on stand-alone clients and servers is 7. ResolvePeerBackOffMinutesRegistry pathHKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpClient VersionWindows XP and Windows Server 2003 This entry specifies the initial interval to wait, in minutes, before attempting to locate a peer to synchronize with. The default value on domain members is 15. The default value on stand-alone clients and servers is 15. ServiceDllRegistry pathHKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Parameters VersionWindows XP and Windows Server 2003 This entry is maintained by W32Time. It contains reserved data that is used by the Windows operating system, and any changes to this setting can cause unpredictable results. The default location for this DLL on both domain members and stand-alone clients and servers is windir\System32\W32Time.dll. ServiceMainRegistry pathHKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Parameters VersionWindows XP and Windows Server 2003 This entry is maintained by W32Time. It contains reserved data that is used by the Windows operating system, and any changes to this setting can cause unpredictable results. The default value on domain members is SvchostEntry_W32Time. The default value on stand-alone clients and servers is SvchostEntry_W32Time. SpecialPollIntervalRegistry pathHKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpClient VersionWindows XP and Windows Server 2003 This entry specifies the special poll interval in seconds for manual peers. When the SpecialInterval 0x1 flag is enabled, W32Time uses this poll interval instead of a poll interval determine by the operating system. The default value on domain members is 3,600. The default value on stand-alone clients and servers is 604,800. SpecialPollTimeRemainingRegistry pathHKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpClient VersionWindows Server 2003 This entry is maintained by W32Time. It contains reserved data that is used by the Windows operating system. It specifies the time in seconds before W32Time will resynchronize after the computer has restarted. Any changes to this setting can cause unpredictable results. The default value on both domain members and on stand-alone clients and servers is left blank. SpikeWatchPeriodRegistry pathHKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Config VersionWindows XP and Windows Server 2003 This entry specifies the amount of time that a suspicious offset must persist before it is accepted as correct (in seconds). The default value on domain members is 900. The default value on stand-alone clients and workstations is 900. TypeRegistry pathHKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Parameters VersionWindows XP and Windows Server 2003 This entry Indicates which peers to accept synchronization from:
The default value on domain members is NT5DS. The default value on stand-alone clients and servers is NTP. UpdateIntervalRegistry pathHKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Config VersionWindows XP and Windows Server 2003 This entry specifies the number of clock ticks between phase correction adjustments. The default value for domain controllers is 100. The default value for domain members is 30,000. The default value for stand-alone clients and servers is 360,000. Note
The following three registry entries are not a part of the W32Time default configuration but can be added to the registry to obtain increased logging capabilities. The information logged to the System Event log can be modified by changing value for the EventLogFlags setting in the Group Policy Object Editor. By default, the time service creates a log in Event Viewer every time that it switches to a new time source. The following registry entries must be added in order to enable W32Time logging: FileLogEntriesRegistry pathHKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Config VersionWindows Server 2003 This entry controls the amount of entries created in the Windows Time log file. The default value is none, which does not log any Windows Time activity. Valid values are 0 to 300. This value does not affect the event log entries normally created by Windows Time. FileLogNameRegistry pathHKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Config VersionWindows Server 2003 This entry controls the location and file name of the Windows Time log. The default value is blank, and should not be changed unless FileLogEntries is changed. A valid value is a full path and file name that Windows Time will use to create the log file. This value does not affect the event log entries normally created by Windows Time. FileLogSizeRegistry pathHKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Config VersionWindows Server 2003 This entry controls the circular logging behavior of Windows Time log files. When FileLogEntries and FileLogName are defined, this entry defines the size, in bytes, to allow the log file to reach before overwriting the oldest log entries with new entries. Any positive number is valid, and 3000000 is recommended. This value does not affect the event log entries normally created by Windows Time. Windows Time Service Group Policy SettingsYou can configure most W32Time parameters by using the Group Policy Object Editor. This includes configuring a computer to be an NTPServer or NTPClient, configuring the time synchronization mechanism, and configuring a computer to be a reliable time source. Note
You can find the Group Policy settings used to configure W32Time in the Group Policy Object Editor snap-in in the following locations:
The following table lists the global Group Policy settings that are associated with the Windows Time service and the pre-set value associated with each setting. For more information about each setting, see the corresponding registry entries in “Windows Time Service Registry Entries” earlier in this subject. The following settings are contained in a single GPO called Global Configuration Settings. Global Group Policy Settings Associated with Windows Time
The following table lists the available settings for the Configure Windows NTP Client GPO and the pre-set values that are associated with the Windows Time service. For more information about each setting, see the corresponding registry entries in “Windows Time Service Registry Entries” earlier in this subject. NTP Client Group Policy Settings Associated with Windows Time
For more information about Group Policy, see the “Group Policy Collection” in the Windows Server 2003 Technical Reference. Network Ports Used by the Windows Time ServiceWindows Time follows the NTP specification, which requires the use of UDP port 123 for all time synchronization communication. This port is reserved by Windows Time and remains reserved at all times. Whenever the computer synchronizes its clock or provides time to another computer, that communication is performed on UDP port 123. Related InformationThe following resources contain additional information that is relevant to this section.
|