[ntp:questions] Re: simple time server
Bryan Henderson
bryanh at giraffe-data.com
Thu Aug 3 18:10:38 UTC 2006
>>>using the local system time.
>
>That presupposes that both your clients and servers are located in the
>same time-zone.
I don't mean "local time" as in 12:00 means solar noon. I mean the time
maintained locally on the system, as opposed to something that's supposed
to match a higher stratum NTP server.
>ntpd needs to be able to adjust the clock. This usually can only be done
>by the root user.
Exactly. The simple service I'm trying to provide, for which I
hypothesized Nptd might be adequate in some mode, has no need to
adjust the clock. So the fact that Ntpd insists on superuser
privilege is evidence that my hypothesis was wrong.
>>> and the fact that it put my kernel in the hardware clock updating
>>> mode).
>
>That's usually considered to be a good thing. Why don't you want it to
>happen?
Well, I never said I didn't want it to happen. I said it was evidence
that Ntpd in the mode I ran it in is not the simple time service I
described.
But I also don't want it to happen. For two reasons:
1) Philosophically, the Linux kernel has no business messing with the
hardware clock. That's something that makes more sense done by a
user space process dedicated to that task. (Ntpd might be a good
choice for that process, but might not).
2) With somebody constantly correcting the hardware clock, it's impossible
to tell what the systematic drift rate of it is, so it's impossible
to keep accurate time while the kernel is not running.
I use Hwclock and its adjtime file to take care of hardware clock
drift while the kernel is not running, but that works only if Hwclock
is the only thing that ever sets the hardware clock.
>The system clock on most Unix systems operates in UTC. Conversion to the
>desired time zone is performed by the OS.
The system clock on a Unix system doesn't operate in a time zone at
all. It keeps absolute time. The OS doesn't convert to local time;
it generates it -- from two pieces of information: 1) absolute time;
2) time zone.
--
Bryan Henderson Phone 408-621-2000
San Jose, California
More information about the questions
mailing list