Você está na página 1de 5

Time Synchronization for Windows 7 Computers K11278, Rev.

A
Sheet 1 of 5
REVISIONS
LTR DESCRIPTION DATE BY/APPD
A Initial Release 1/16/2012 RM/
TIME SYNCHRONIZATION FOR WINDOWS 7 COMPUTERS
K11278
EXPORT WARNING STATEMENT: This document contains technical data whose export is restricted by the Arms
Export Control Act (Title 22, U.S.C, Sec 2751, et seq.) or Export Administration Act of 1979, as amended, Title 50,
U.S.C. App. 2401 et seq. Violations of these export laws are subject to severe criminal penalties.
DR R.TSAI 01/05/12 APPD
CHK APPD
TITLE
TIME SYNCHRONIZATION
FOR WINDOWS 7 COMPUTERS
NUMBER REV
USED ON NEXT ASSY K11278 A
APPLICATION Word 2010 LOCATION/FILE NAME:
Time Synchronization for Windows 7 Computers K11278, Rev. A
Sheet 2 of 5
1. TIME SYNCHRONIZATION NOTES
The information found in this procedure is subject to change.
Whenever running a command on a Windows 7 computer through a command prompt, you must
use an elevated command prompt. That is, start the command prompt to Run as administrator.
A valid time source(s), and an active network connection to the time source(s), must be present
for the time synchronization to function correctly.
2. SYNCHRONIZE THE CLIENT CLOCK WITH TIME SERVER(S)
1. Delete two triggers (this applies to Windows 7 computers).
a. To see if there are any start/stop triggers for the w32time service, run the command: sc
qtriggerinfo w32time
If there are, you will see something like the following:
[SC] QueryServiceConfig2 SUCCESS
SERVICE_NAME: w32time
START SERVICE
DOMAIN JOINED STATUS : 1ce20aba-9851-4421-9430-1ddeb766e809 [DOMAIN
JOINED]
STOP SERVICE
DOMAIN JOINED STATUS : ddaf516e-58c2-4866-9574-c3b615d42ea1 [NOT
DOMAIN JOINED]
If there are no triggers associated with the w32time service, you will see:
[SC] QueryServiceConfig2 SUCCESS
The service w32time has not registered for any start or stop triggers.
b. To delete any start/stop triggers for the w32time service, run the command: sc triggerinfo
w32time delete
2. Verify the Windows Time service (w32time) is set to automatic
3. Run the following commands:
a. net stop w32time
b. net start w32time
c. w32tm /config /update /manualpeerlist:IPAdresses_of_servers
/syncfromflags:MANUAL
d. w32tm /resync
Note: You should enter the IP Address of every SMS and/or WB server installed. If there is more
than one SMS server, then enter each IP Address (in the IPAdresses_of_servers) separated by spaces.
Note: if you want to make any changes to the w32tm (for example, you want to change the list of
servers listed in the manualpeerlist), you must run all steps listed in 3 above.
Time Synchronization for Windows 7 Computers K11278, Rev. A
Sheet 3 of 5
3. TROUBLESHOOTING GUIDE
1. To see if the client is setup to synchronize with a server, run the command: w32tm /query /status.
a. A successful time synchronization with server at 10.16.105.181 looks like:
Leap Indicator: 0(no warning)
Stratum: 2 (secondary reference - syncd by (S)NTP)
Precision: -6 (15.625ms per tick)
Root Delay: 0.0312500s
Root Dispersion: 1.7824690s
ReferenceId: 0x0A1069B5 (source IP: 10.16.105.181)
Last Successful Sync Time: 5/23/2011 3:50:10 PM
Source: 10.16.105.181
Poll Interval: 10 (1024s)
2. To re-synchronize with a server (and also see if the server can be a time source), run the
command: w32tm /resync.
a. A successful time synchronization with server looks like this:
Sending resync command to local computer
The command completed successfully.
3. Look in Event Log for time errors.
4. Verify server is acting as a time source (usually this means that our server is running our GPS).
5. Outgoing ntp is listed as an exception in the (advanced) firewall on the client (it is ok if the entry
is missing, but not if listed and not an exception). Look for the same think for incoming ntp on
the server.
4. w32tm FUNCTION HELP
w32tm [/? | /register | /unregister ]
? - this help screen.
register - register to run as a service and add default configuration to the registry.
unregister - unregister service and remove all configuration information from the registry.
w32tm /monitor [/domain:<domain name>]
[/computers:<name>[,<name>[,<name>...]]]
[/threads:<num>] [/ipprotocol:<4|6>] [/nowarn]
domain - specifies which domain to monitor. If no domain name is given, or neither the domain nor
computers option is specified, the default domain is used. This option may be used more than
once.
computers - monitors the given list of computers. Computer names are separated by commas, with no
spaces. If a name is prefixed with a '*', it is treated as an AD PDC. This option may be used more
than once.
threads - how many computers to analyze simultaneously. The default value is 3. Allowed range is 1-50.
ipprotocol - specify the IP protocol to use. The default is to use whatever is available.
nowarn - skip warning message.
w32tm /ntte <NT time epoch>
Convert a NT system time, in (10^-7)s intervals from 0h 1-Jan 1601, into a readable format.
w32tm /ntpte <NTP time epoch>
Convert an NTP time, in (2^-32)s intervals from 0h 1-Jan 1900, into a readable format.
Time Synchronization for Windows 7 Computers K11278, Rev. A
Sheet 4 of 5
w32tm /resync [/computer:<computer>] [/nowait] [/rediscover] [/soft]
Tell a computer that it should resynchronize its clock as soon as possible, throwing out all accumulated
error statistics.
computer:<computer> - computer that should resynchronize. If not specified, the local computer will
resynchronize.
nowait - do not wait for the resynchronization to occur; return immediately. Otherwise, wait for the
resynchronize to complete before returning.
rediscover - redetect the network configuration and rediscover network sources, then resynchronize.
soft - resynchronize utilizing existing error statistics. Not useful, provided for compatibility.
w32tm /stripchart /computer:<target> [/period:<refresh>]
[/dataonly] [/samples:<count>] [/packetinfo] [/ipprotocol:<4|6>]
Display a strip chart of the offset between this computer and another computer.
computer:<target> - the computer to measure the offset against.
period:<refresh> - the time between samples, in seconds. The default is 2s
dataonly - display only the data, no graphics.
samples:<count> - collect <count> samples, then stop. If not specified, samples will be collected until
Ctrl-C is pressed.
packetinfo - print out NTP packet response message.
ipprotocol - specify the IP protocol to use. The default is to use whatever is available.
w32tm /config [/computer:<target>] [/update]
[/manualpeerlist:<peers>] [/syncfromflags:<source>]
[/LocalClockDispersion:<seconds>]
[/reliable:(YES|NO)]
[/largephaseoffset:<milliseconds>]
computer:<target> - adjusts the configuration of <target>. If not specified, the default is the local
computer.
update - notifies the time service that the configuration has changed, causing the changes to take effect.
manualpeerlist:<peers> - sets the manual peer list to <peers>, which is a space-delimited list of DNS
and/or IP addresses. When specifying multiple peers, this switch must be enclosed in quotes.
syncfromflags:<source> - sets what sources the NTP client should synchronize from. <source> should
be a comma separated list of these keywords (not case sensitive):
MANUAL - synchronize from peers in the manual peer list
DOMHIER synchronize from an AD DC in the domain hierarchy
NO - synchronize from none
ALL - synchronize from both manual and domain peers
LocalClockDispersion:<seconds> - configures the accuracy of the internal clock that w32time will
assume when it can't acquire time from its configured sources.
reliable:(YES|NO) - set whether this machine is a reliable time source. This setting is only meaningful
on domain controllers.
YES - this machine is a reliable time service
NO - this machine is not a reliable time service
largephaseoffset:<milliseconds> - sets the time difference between local and network time which
w32time will consider a spike.
w32tm /tz
Display the current time zone settings.
w32tm /dumpreg [/subkey:<key>] [/computer:<target>]
Display the values associated with a given registry key.
Time Synchronization for Windows 7 Computers K11278, Rev. A
Sheet 5 of 5
The default key is HKLM\System\CurrentControlSet\Services\W32Time (the root key for the time
service).
subkey:<key> - displays the values associated with subkey <key> of the default key.
computer:<target> - queries registry settings for computer <target>.
w32tm /query [/computer:<target>]
{/source | /configuration | /peers | /status}
[/verbose]
Display a computer's windows time service information.
computer:<target> - query the information of <target>. If not specified, the default is the local computer.
source: display the time source.
configuration: display the configuration of run-time and where the setting comes from. In verbose mode,
display the undefined or unused setting too.
peers: display a list of peers and their status.
status: display windows time service status.
verbose: set the verbose mode to display more information.
w32tm /debug {/disable | {/enable /file:<name> /size:<bytes> /entries:<value>
[/truncate]}}
Enable or disable local computer windows time service private log.
disable: disable the private log.
enable: enable the private log.
file:<name> - specify the absolute filename.
size:<bytes> - specify the maximum size for circular logging.
entries:<value> - contains a list of flags, specified by number and separated by commas, that specify
the types of information that should be logged. Valid numbers are 0 to 300. A range of numbers is
valid, in addition to single numbers, such as 0-100,103,106. Value 0-300 is for logging all
information.
truncate: truncate the file if it exists.
5. w32tm EXAMPLE
The example below deletes a trigger, stops and stops the time service, adds three server IPs as time
servers, and forces a time resynchronization.
sc triggerinfo w32time delete
net stop w32time
net start w32time
w32tm /config /update /manualpeerlist: 192.168.101.11 192.168.101.12 192.168.101.13
/syncfromflags:MANUAL
w32tm /resync

Você também pode gostar