[ale] semi [OT] NTP questions - and NTP Windows - was: possibility of running an NTP server

Ron Frazier atllinuxenthinfo at c3energy.com
Fri Jan 13 16:54:02 EST 2012


Hi guys,

As you know from prior threads, I've been doing lots of work with NTP 
(as a client) recently.  I've got my Linux machines running nicely, and 
have turned my attention to Windows.  I found a nice NTP port for 
Windows that works great and has a really cool graphical interface and 
graphical statistics monitor.  It uses the same server configuration 
lines as the Linux ntp.conf, although some parts of the configuration 
file are different and customized to the Windows environment.  See the 
bottom of this message for links to screen shots of the NTP service 
running under Windows.  It's very cool.

The system is working, but has brought up even more questions.

Here you see a statistics image of how my system is performing using the 
Windows NTP service.  Note that the internal Windows NTP service is 
disabled and replaced by this new program I installed.

http://dl.dropbox.com/u/9879631/ntp-mon15.jpg

NTP is polling the NIST service every 4 minutes, and, as you can see 
from the red graph, my clock offset is all over the place, varying from 
-5 ms to +110 ms.  I also notice that the frequency is drifting up from 
-13 to -9.  Can someone explain to me in a few words what the frequency 
means?  Does this graph mean that the system is trimming my clock?

All this brings up more questions about how NTP works.  I know that the 
computer has a hardware and a software clock.  I know the hardware clock 
keeps the time when the system is off.  When the OS boots, it gets time 
from the hardware clock and then starts counting interrupts to maintain 
the software clock, as I understand it.  Based on my reading, it seems 
that when the OS gets busy, it may disable the interrupts for fractions 
of a second, which means it misses the clock interrupts.  Therefore, the 
system's software clock loses or gains time.

I want to know what NTP does with the hardware and software clocks.  I 
know it's polling NIST every 4 minutes, in this case, to get the correct 
time.  I know it sets the software clock and calculates and displays and 
records the offset from true time each time.  But, does the NTP daemon / 
service also set the hardware clock at that time?  If not, when does the 
hardware clock get reset.  Does it get set at shutdown?

While this method is working and keeping my clock within about 120 ms of 
true time, it's polling NIST very frequently, although still within 
their access policy.  I'm thinking an alternative may be better.  I've 
noticed the polling interval almost never extends to longer settings, in 
this case, whereas it does on Linux while still maintaining an offset of 
under 20 ms or so.

I think that the hardware clock is probably much more accurate than the 
software clock in Windows.  I'd like to set the NTP system to poll the 
hardware clock, say, every minute for 5-20 minutes.  Then, at the end of 
that time, I'd like it to poll an internet server like NIST and reset 
both the hardware and software clocks.  The net effect of this would be 
something like the way the radio clocks work, synchronizing with NIST 
once a night, and freewheeling in between those sync sessions.  In this 
case, continually synchronizing the software clock to the hardware 
clock, assuming the hardware clock is any good, will keep the software 
clock accurate while the system waits for an external sync.  That way, I 
think I could maintain reasonable accuracy while not having to ping NIST 
every 4 minutes.

I'd also like to know if you can tell the NTP system that I can tolerate 
a certain amount of error without it getting bent out of shape.  For, 
example, I might be willing to tolerate up to 400 ms of offset between 
sync sessions.

Finally, I really like the way this Windows NTP program uses a GUI for 
configuration and statistics.  I'd like to know if there is anything 
similar on my Linux systems.

I don't think they've changed this NTP program in a couple of years, but 
it does it's job.  If you'd like to get this Windows NTP program for 
your own use, you can get it at the links below:

- Read the documentation here:
      http://www.meinberg.de/english/sw/readme-ntpinstaller.htm

- Download the Windows NTP service / daemon package here (install this 
first):
      http://www.meinberg.de/english/sw/ntp.htm

- Download the GUI and statistics system here (install this second)
      http://www.meinberg.de/english/sw/time-server-monitor.htm

Install the daemon / service and get it going.  Let it set up the 
default config file and, say, pick some US pool servers.  Then, install 
the time server monitor, give it admin rights if you want to use it's 
controls to start and stop the service, and make sure it's operation is 
tied to the service and it's reporting properly.  Then, you can enable 
statistics, etc.  Once it's running OK, you can stop the service, edit 
the config file to tweak the server settings, and restart the service.  
Make sure the setup screen says to start the service automatically if 
you want it to do that.  It will say manually while it's stopped, but 
should go back to automatically once it's started again.  If anyone 
needs help setting this up, I'd be glad to help.  I think this is the 
best time setting solution I've seen for Windows.  I like it better than 
the NIST client I'd been running before.

Sincerely,

Ron

---------------------------------

Links to screen shots of the Windows NTP client:


http://dl.dropbox.com/u/9879631/ntp-mon01.jpg
http://dl.dropbox.com/u/9879631/ntp-mon02.jpg
http://dl.dropbox.com/u/9879631/ntp-mon03.jpg
http://dl.dropbox.com/u/9879631/ntp-mon04.jpg
http://dl.dropbox.com/u/9879631/ntp-mon05.jpg
http://dl.dropbox.com/u/9879631/ntp-mon06.jpg
http://dl.dropbox.com/u/9879631/ntp-mon07.jpg
http://dl.dropbox.com/u/9879631/ntp-mon08.jpg
http://dl.dropbox.com/u/9879631/ntp-mon09.jpg
http://dl.dropbox.com/u/9879631/ntp-mon10.jpg
http://dl.dropbox.com/u/9879631/ntp-mon11.jpg
http://dl.dropbox.com/u/9879631/ntp-mon12.jpg
http://dl.dropbox.com/u/9879631/ntp-mon13.jpg
http://dl.dropbox.com/u/9879631/ntp-mon14.jpg
http://dl.dropbox.com/u/9879631/ntp-mon15.jpg
http://dl.dropbox.com/u/9879631/ntp-mon16.jpg


-- 

(PS - If you email me and don't get a quick response, you might want to
call on the phone.  I get about 300 emails per day from alternate energy
mailing lists and such.  I don't always see new messages very quickly.)

Ron Frazier

770-205-9422 (O)   Leave a message.
linuxdude AT c3energy.com



More information about the Ale mailing list