Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

ntpq-equivalent for Microsoft's Windows Time Service ?

892 views
Skip to first unread message

Bart Van Assche

unread,
Apr 1, 2009, 3:39:43 AM4/1/09
to
Hello,

I would like to monitor the operation of the NTP-algorithm as
implemented in Microsoft's Windows Time Service (I know that older
w32time implementations only support SNTP, and that newer
implementations support both SNTP and NTP). I already found out that
it is possible to query the configuration settings of the Windows Time
Service through the w32tm /dumpreg command (equivalent of cat /etc/
ntp.conf), and that it is possible to compare the local clock with a
remote clock through the w32tm /monitor command (equivalent of ntpdate
-q). I would like to be able to query the internal variables of the
Windows Time Service, just like the command ntpq -p does. Does anyone
know whether this is possible with the Windows Time Service provided
by Microsoft ?

The official Microsoft documentation of the Windows Time Service can
be found here: http://technet.microsoft.com/en-us/library/cc773061.aspx.

Thanks for your time,

Bart Van Assche.

Bart Van Assche

unread,
Apr 1, 2009, 6:26:08 AM4/1/09
to

Update: via Cygwin's string command (string -2 -a -el) I found out
that the w32tm command has the following undocumented switches: /
service, /sysexpr, /testif and /testservice. Does anyone know the
meaning of these switches ?

And through depends.exe I learned that w32tm.exe loads w32time.dll. A
list of the functions exported by this DLL can be found here:
http://labo.kandcnet.com/winarekore/DllExportList/ExportList/w32time.dll.htm.
The exported functions TimeProvOpen(), TimeProvCommand() and
TimeProvClose() probably implement a time provider as documented on
MSDN (http://msdn.microsoft.com/en-us/library/ms725475(VS.85).aspx).
Does anyone know the purpose and the parameters of the other function
exported by w32time.dll: fnW32TmRegisterServiceCtrlHandlerEx,
fnW32TmSetServiceStatus, W32TimeBufferFree, W32TimeDcPromo,
W32TimeGetNetlogonServiceBits
W32TimeQueryConfig, W32TimeQueryHardwareProviderStatus,
W32TimeQueryNTPProviderStatus
W32TimeSetConfig, W32TimeSyncNow, W32TimeVerifyJoinConfig,
W32TimeVerifyUnjoinConfig and W32TmServiceMain
?

Bart.

Danny Mayer

unread,
Apr 1, 2009, 8:35:34 AM4/1/09
to
Bart Van Assche wrote:
> On 1 apr, 09:39, Bart Van Assche <bart.vanass...@gmail.com> wrote:
>> I would like to monitor the operation of the NTP-algorithm as
>> implemented in Microsoft's Windows Time Service (I know that older
>> w32time implementations only support SNTP, and that newer
>> implementations support both SNTP and NTP). I already found out that
>> it is possible to query the configuration settings of the Windows Time
>> Service through the w32tm /dumpreg command (equivalent of cat /etc/
>> ntp.conf), and that it is possible to compare the local clock with a
>> remote clock through the w32tm /monitor command (equivalent of ntpdate
>> -q). I would like to be able to query the internal variables of the
>> Windows Time Service, just like the command ntpq -p does. Does anyone
>> know whether this is possible with the Windows Time Service provided
>> by Microsoft ?
>>
>> The official Microsoft documentation of the Windows Time Service can
>> be found here:http://technet.microsoft.com/en-us/library/cc773061.aspx.
>

Microsoft doesn't support queries (mode 6 packets) at all so it's
impossible to query for state. They have a blog for the windows time
service here: http://blogs.msdn.com/w32time/default.aspx if you want do
dig in. They also state that they do not support high accuracy time and
that's it's meant just to deal with the Kerberos requirements in RFC
1510 to have clocks between Kerberos client and server within 5 minutes
of each other. That's to prevent (or at least reduce) replay attacks.

Danny

David Woolley

unread,
Apr 1, 2009, 6:53:17 PM4/1/09
to
Bart Van Assche wrote:
>
> I would like to monitor the operation of the NTP-algorithm as
> implemented in Microsoft's Windows Time Service (I know that older
> w32time implementations only support SNTP, and that newer
> implementations support both SNTP and NTP). I already found out that

It looks like, in a non-default configuration it supports some of the
normative parts of RFC1305.

> it is possible to query the configuration settings of the Windows Time
> Service through the w32tm /dumpreg command (equivalent of cat /etc/
> ntp.conf), and that it is possible to compare the local clock with a
> remote clock through the w32tm /monitor command (equivalent of ntpdate
> -q). I would like to be able to query the internal variables of the

I don't think it is clear that it uses the same time discipline logic as
NTP. Technically that is in a non-normative appendix, but it is treated
as normative, in this community, and I think it is normative for NTPV4
(Microsoft implement the de facto obsolete version, although the most
recent one with an RFC).

> Windows Time Service, just like the command ntpq -p does. Does anyone
> know whether this is possible with the Windows Time Service provided
> by Microsoft ?
>
> The official Microsoft documentation of the Windows Time Service can
> be found here: http://technet.microsoft.com/en-us/library/cc773061.aspx.

My source is ...cc773263.... Your reference may explain some of the
terms used in that document, that otherwise are meaningless without the
source code.

0 new messages