Recipe 16.19. Enabling Windows Time Service Logging


Problem

You are experiencing problems with your clock not being synchronized or being skewed from the actual time. By enabling logging of the Windows Time service you can see detailed information about interactions with the time server.

Solution

You need to set three Registry values to enable Windows Time service logging.

First, the following value configures the location of the log file:

Key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Config Value Name: FileLogName Value Type: REG_SZ Value Data: <LogFileName>

Replace <LogFileName> with the path to the log file (e.g., c:\w32time.log).

Second, the following value configures the maximum size you'll allow the log file to grow to:

Key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Config Value Name: FileLogSize Value Type: REG_DWORD Value Data: <SizeInBytes>

Replace <SizeInBytes> with the max size in bytes (e.g., 10485760 for 10 MB).

Last, the following value enables logging:

Key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Config Value Name: FileLogEntries Value Type: REG_SZ Value Data: 0-116

Enter the data exactly as shown (i.e., 0-116). You can enable verbose logging by entering 0-300.

You'll need to restart the Windows Time service for logging to begin:

> net stop w32time > net start w32time

Discussion

Ever had a computer whose clock never kept the right time? It can be difficult to troubleshoot this problem, but enabling logging of the Windows Time service can usually pinpoint the problem. There may be a lot of text in the log file you don't understand, but look for lines that contain "Domain member syncing from," "Polling peer," or "Sending packet to." These lines will point out the time (NTP) server the machine is communicating with. Make sure that server has the correct time.

See Also

MS KB 816043, "HOW TO: Turn On Debug Logging in the Windows Time Service"



Windows XP Cookbook
Windows XP Cookbook (Cookbooks)
ISBN: 0596007256
EAN: 2147483647
Year: 2006
Pages: 408

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net