![w32time 无法正确同步](https://linux22.com/image/677213/w32time%20%E6%97%A0%E6%B3%95%E6%AD%A3%E7%A1%AE%E5%90%8C%E6%AD%A5.png)
我遇到了一个问题,即我们的网络中主 DC PDC 模拟器无法获得正确的时间。它几乎一直处于 80 秒左右的关闭状态,我不知道如何修复它。
该机器现在是虚拟的(尽管我可以把它变成一个小的物理盒子)。w32 时间配置是:
PS c:\> w32tm /query /configuration
[Configuration]
EventLogFlags: 2 (Policy)
AnnounceFlags: 10 (Policy)
TimeJumpAuditOffset: 28800 (Local)
MinPollInterval: 6 (Policy)
MaxPollInterval: 10 (Policy)
MaxNegPhaseCorrection: 172800 (Policy)
MaxPosPhaseCorrection: 172800 (Policy)
MaxAllowedPhaseOffset: 300 (Policy)
FrequencyCorrectRate: 4 (Policy)
PollAdjustFactor: 5 (Policy)
LargePhaseOffset: 50000000 (Policy)
SpikeWatchPeriod: 900 (Policy)
LocalClockDispersion: 10 (Policy)
HoldPeriod: 5 (Policy)
PhaseCorrectRate: 1 (Policy)
UpdateInterval: 100 (Policy)
[TimeProviders]
NtpClient (Local)
DllName: C:\Windows\system32\w32time.dll (Local)
Enabled: 1 (Local)
InputProvider: 1 (Local)
AllowNonstandardModeCombinations: 1 (Local)
ResolvePeerBackoffMinutes: 15 (Policy)
ResolvePeerBackoffMaxTimes: 7 (Policy)
CompatibilityFlags: 2147483648 (Local)
EventLogFlags: 0 (Policy)
LargeSampleSkew: 3 (Local)
SpecialPollInterval: 3600 (Policy)
Type: NTP (Policy)
NtpServer: 0.pool.ntp.org 1.pool.ntp.org 2.pool.ntp.org 3.pool.ntp.org (Policy)
NtpServer (Local)
DllName: C:\Windows\system32\w32time.dll (Local)
Enabled: 1 (Local)
InputProvider: 0 (Local)
AllowNonstandardModeCombinations: 1 (Local)
VMICTimeProvider (Local)
DllName: C:\Windows\System32\vmictimeprovider.dll (Local)
Enabled: 0 (Local)
InputProvider: 1 (Local)
状态正常:
PS C:\> w32tm /query /status
Leap Indicator: 0(no warning)
Stratum: 3 (secondary reference - syncd by (S)NTP)
Precision: -6 (15.625ms per tick)
Root Delay: 0.0324097s
Root Dispersion: 7.8030176s
ReferenceId: 0xD5C7E11E (source IP: 213.199.225.30)
Last Successful Sync Time: 2/18/2016 3:35:04 PM
Source: 3.pool.ntp.org
Poll Interval: 6 (64s)
问题是 - 它从来都不同步:
PS C:\> w32tm /stripchart /computer:0.pool.ntp.org
Tracking 0.pool.ntp.org [213.199.225.30:123].
The current time is 2/18/2016 3:35:47 PM.
15:35:47 d:+00.0311088s o:-82.0529984s [@ | ]
15:35:49 d:+00.0154871s o:-82.0677911s [@ | ]
15:35:51 d:+00.0623276s o:-82.0255517s [@ | ]
15:35:53 d:+00.0622825s o:-82.0269740s [@ | ]
15:35:56 d:+00.0157822s o:-82.0521575s [@ | ]
15:35:58 d:+00.0934684s o:-82.0032442s [@ | ]
15:36:00 d:+00.0155794s o:-82.0391704s [@ | ]
15:36:02 d:+00.0623131s o:-82.0049890s [@ | ]
15:36:04 d:+00.0417698s o:-82.0176236s [@ | ]
15:36:06 d:+00.0328697s o:-82.0160905s [@ | ]
15:36:08 d:+00.0623356s o:-82.0340346s [@ | ]
15:36:10 d:+00.0467246s o:-82.0011794s [@ | ]
15:36:12 d:+00.0210196s o:-81.9949078s [@ | ]
15:36:14 d:+00.0311386s o:-82.0052247s [@ | ]
15:36:16 d:+00.0336086s o:-81.9847832s [@ | ]
15:36:18 d:+00.0466688s o:-81.9732556s [@ | ]
15:36:20 d:+00.0522205s o:-81.9706647s [@ | ]
15:36:22 d:+00.0623951s o:-81.9470197s [@ | ]
15:36:25 d:+00.0311279s o:-81.9684429s [@ | ]
15:36:27 d:+00.0522267s o:-81.9522678s [@ | ]
15:36:29 d:+00.0155412s o:-81.9621962s [@ | ]
15:36:31 d:+00.0522921s o:-81.9384797s [@ | ]
15:36:33 d:+00.0559207s o:-81.9362417s [@ | ]
15:36:35 d:+00.0311349s o:-81.9470118s [@ | ]
15:36:37 d:+00.0155557s o:-81.9451556s [@ | ]
这表明延迟始终为 81-82 秒。同步不会改变这一点。
有人知道这是为什么吗?
根据要求,这里有更详细的状态:
PS C:\> w32tm /query /status /verbose
Leap Indicator: 0(no warning)
Stratum: 3 (secondary reference - syncd by (S)NTP)
Precision: -6 (15.625ms per tick)
Root Delay: 0.0381470s
Root Dispersion: 7.7932527s
ReferenceId: 0x2EFAAC02 (source IP: 46.250.172.2)
Last Successful Sync Time: 2/18/2016 4:33:39 PM
Source: 0.pool.ntp.org
Poll Interval: 6 (64s)
Phase Offset: 0.0000050s
ClockRate: 0.0155860s
State Machine: 1 (Hold)
Time Source Flags: 0 (None)
Server Role: 64 (Time Service)
Last Sync Error: 0 (The command completed successfully.)
Time since Last Good Sync Time: 29.5655870s
还有一些人要求的输出:
PS C:\> w32tm /monitor
dc-o-2 [[fe80::480c:c93e:660a:429f%12]:123]:
ICMP: 0ms delay
NTP: -82.7908243s offset from dc-o-1.operations.local
RefID: ntp.wide-net.pl [195.46.37.22]
Stratum: 3
dc-o-ckg-1 [172.26.0.1:123]:
ICMP: 174ms delay
NTP: -82.7945201s offset from dc-o-1.operations.local
RefID: sunsite.icm.edu.pl [193.219.28.2]
Stratum: 3
dc-o-1 *** PDC ***[10.42.0.1:123]:
ICMP: 0ms delay
NTP: +0.0000000s offset from dc-o-1.operations.local
RefID: news-archive.icm.edu.pl [193.219.28.147]
Stratum: 3
这些是当前网络中的 3 台机器。请注意,名称中带有 ckg 的机器通过 VPN 距离约 170ms - 这是从中欧到芝加哥的时差。