[ntp:questions] Re: simple time server

Steve Kostecke kostecke at ntp.isc.org
Thu Aug 3 02:05:46 UTC 2006


On 2006-08-01, Bryan Henderson <bryanh at giraffe-data.com> wrote:

> I want a server that simply tells clients when they ask what time it
> is,

Merely emitting a time stamp does not account for propagation delays,
TCP overhead, etc.

>using the local system time.

That presupposes that both your clients and servers are located in the
same time-zone.

> Preferably with NTP.

NTP provides you with a way of synchronizing your clocks and
continuously disciplines them to control the drift.

rdate, on the other hand, merely adjusts your clock (by stepping or
intiating a slew) each time it is run.

> After reading a bunch of Ntpd documentation, I thought the
> undisciplined local clock driver might be that, but in experiments, it
> appears to be quite a bit more complex (judging from debug messages,
> its demanding superuser privilege,

ntpd needs to be able to adjust the clock. This usually can only be done
by the root user.

> 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?

> Ideally, I'd like something simple enough it could even run via Inetd.

You could use the time service built in to inetd (already mentioned in
other articles).

If you wish to use some other service, keep in mind that there will be
some overhead: waiting for inetd to spawn the service, then determining
the time, and then returning the time to the user.

> Is there such a program available for Unix?

The system clock on most Unix systems operates in UTC. Conversion to the
desired time zone is performed by the OS. 

Can you provide any details about your application?

-- 
Steve Kostecke <kostecke at ntp.isc.org>
NTP Public Services Project - http://ntp.isc.org/




More information about the questions mailing list