Dec 31, 2008

How often does Windows NTP correct the clock against the NTP server?

How often does Windows NTP correct the clock against the NTP server?
Well after many hours of investigating I found the answer is more complicated that I thought. An entire list of settings and defaults can be found here:
http://technet.microsoft.com/en-us/library/cc775797.aspx

To answer this question the important registry key is The "MaxPollInterval" registry key. This key controls in timing at which the computer will query for NTP time.

The Key can be found here:
HKLM\SYSTEM\CurrentControlSet\Services\W32Time\Config
Data type = REG_DWORD
Default value = 15

Description
Specifies the longest interval (in units of 2 to the n power seconds, where n is the value of this entry) that is allowed for system polling. While the system does not request samples less frequently than this, a provider may refuse to produce samples when requested to do so.
(http://technet.microsoft.com/en-us/library/cc739293.aspx)

The clock then corrects itself based on other values in the registry in its range. So basically if left at default it will poll every 32,768 seconds or 546.1333 Minutes or 9.10222 Hours.

The Correction
The "FrequencyCorrectRate" registry entry Controls the rate at which the time service corrects the clock.

The Key can be found here:
HKLM\SYSTEM\CurrentControlSet\Services\W32Time\Config
Data type = REG_DWORD
Default value = 4

The Effect this key has is One over the rate at which the clock is corrected. If this value is too small, the clock will be unstable and will overcorrect. If the value is too large, the clock will take a long time to synchronize.
(http://technet.microsoft.com/en-us/library/cc775797.aspx)
This value, in units equal to the reciprocal of the rate at which the clock is corrected, is multiplied by the number of clock ticks in 64 seconds, to produce the base gain in the phase-locked loop (PLL) of the clock correction algorithm.
(http://technet.microsoft.com/en-us/library/cc738293.aspx)


Ok that's nice, but what does that translate to?
Well basically there is a correction algorithm that is built in that will correct the clock in small increments until it is in sync with the source. I could not find this algorithm so if you know what it is please post it in a reply.

If you have more questions about Windows Time Service check the official blog at:
http://blogs.msdn.com/w32time/default.aspx

Internet Time Sources
If you are looking for an external time server the PDC or Primary NTP server for your facility should point externally. NIST or the National Institute of Science and Technology keep the world clock for the US which is in Boulder, Colorado. They also keep several servers around the USA running for people to sync to. You can find the list at:
http://tf.nist.gov/tf-cgi/servers.cgi

Dec 29, 2008

How to Install a plug-in or update Eclipse

Obtain the update site url from the eclipse plugin you would like to add or update. This can usually be found on the project web site.

Open Eclipse > Help > Software Updates > Available Software [tab] > Add Site [button] > Add url to the location field > Check the appropriate options under the update site > Install [button]

How to disable XML and other Validation in Eclipse

Window > Preferences > Validation and uncheck the appropriate Validator. This will also help speed up the Eclipse refresh time.

Dec 11, 2008

MD5 Password Generation via Linux

You can run the following command in Linux to generate an MD5 password:

echo -n "the_password" | md5sum