[ntp:questions] Re: ntp? return value for use in scripts
hmurray at suespammers.org
Mon Jan 26 23:37:37 UTC 2004
>The crystal driving my TOY chip is spec'd to be more accurate than the
>one driving my CPU, so if ntpd is not able to discipline my system
>clock using the internet, the system time will drift relative to the
>TOY chip. So I want to periodically set the system time to the TOY
>time. The only other way I can see to discipline my system clock
>would be to write a reference driver for my TOY chip, but since it
>only ticks off with 1 second resolution, people on this list told me I
>shouldn't use it.
On some/most systems, the system clock actually runs off the
TOY clock - it generates a convenient interrupt every 10 ms.
(I expected it to run off the CPU cycle counter, but the gurus
here pointed out that gets tricky on a multi-CPU system.
And that story explained why I couldn't find the code I was
looking for in the Linux kernel.)
Unless your system is different, it's actually using the
good crystal already.
How stable is the temperature you will be running in?
ntp normally figures out a first-order correction factor
for your clock. That's the number (ppm) stored in
/etc/ntp.drift (or wherever). If you get disconnected
from the network, the clock will stay reasonably accurate
rather than drift at the rate of the raw difference between
real and expected crystal frequencies.
This works better if the temperature is stable.
So if you write the "good" time back to the TOY chip occasionally,
you will be close(er) the next time you crash and reboot.
The suespammers.org mail server is located in California. So are all my
other mailboxes. Please do not send unsolicited bulk e-mail or unsolicited
commercial e-mail to my suespammers.org address or any of my other addresses.
These are my opinions, not necessarily my employer's. I hate spam.
More information about the questions