Windows

Manage time accuracy in Windows Server 2008 with W32Tm

Does Windows Server 2008 mean the end to time issues in a Windows Server environment? No, but Rick Vanover discusses one command that can make it easier to manage time.

Time accuracy seems simple, but there are many factors that complicate this task. Window Server 2008 introduces one feature that gives some specific help in this area. W32Tm on Windows Server 2008 allows you to enable a debug log for the interactions with the time services as they occur on the system.

Enter the following command on a Windows 2008 system to enable the debug log file timelog.txt to be written locally as the Windows Time service interacts with the system:

w32tm /debug /enable /file:C:logstimelog.txt /size:100000 /entries:0-300
This log file will write out entries as automatic time synchronizations occur if configured. This log will not record time synchronization actions performed manually by using the net time command with the /set option. A Windows Event Log entry in the system category would still record the net time command with the user or credential that performed the task. Like the Windows Event log entries, the W32Tm debug log is per Windows Server, so managing a large number of these entries would be cumbersome and file intensive.

In the example command shown above, the timelog.txt file has a file size limited to 100K and full logging by the /entries:0-300 parameter. The timelog.txt file will run as long as the Windows Time service is running or until the following command is run to stop the debug logging:

w32tm /debug /disable

To achieve maximum time accuracy, the single most effective solution is to have domain controllers and standalone systems synchronize with an NTP server. This process is outlined in the Microsoft KB article 816042.

Stay on top of the latest Windows Server 2003 and Windows Server 2008 tips and tricks with our free Windows Server newsletter, delivered each Wednesday. Automatically sign up today!

About

Rick Vanover is a software strategy specialist for Veeam Software, based in Columbus, Ohio. Rick has years of IT experience and focuses on virtualization, Windows-based server administration, and system hardware.

5 comments
b4real
b4real

If you are running WS2K8 (or any OS) be sure to watch time drift, as VMs are notorious for this issue.

ederkley
ederkley

Much better than using w32tm! Thanks very much

steven.taylor
steven.taylor

I found (on a win2003 server farm) to make sure group policy for time services is enabled so that your primary time server (such as your domain controller) can get it's time synch, then the other servers can synch to it. I was just spinning wheels until I enable this in GP. I assume it will be similar in 2008.

ES-ES
ES-ES

We have found that you NEED to get your time for the VM Host from your time server and then also setup your Windows servers to also get the time from the same NTP server and then things work so much better!!

Editor's Picks