Re: What TZ do you use to get right time w/ clockspeed?

[email protected] (Paul Jarc) Fri, 15 Nov 2002 12:45:48 -0500
Newsgroups gmane.comp.lib.libtai
Organization What did you have in mind? A short, blunt, human pyramid?
Message-ID <[email protected]>
Malte Tancred <[email protected]> wrote:
> On the time server:
>
>    1) Install and run clockspeed through daemontools
>
>    2) Compile and use the right/ zone files (ie ln -s
> /usr/.../right/... /etc/localtime)
>
>    3) Create an ntpd configuration for a local clock drive. Here's mine:

ntpd expects the system clock to be POSIX, doesn't it?  Or does it
depend on the time zone setting?  I think the times published by your
ntpd are 22 seconds ahead of those published by other time servers.

> From another machine in our net (habanero.oops.se) that's syncing
> against our clockserver (ntp.oops.se) using ntpd:
>
>     - copied sntpclock and clockview programs from ntp.oops.se.
>     - installed a leapsecs.dat file.
>     - _no_ right/ zones installed.

If you have leapsecs.dat, libtai will expect the clock to be TAI.  But
without right/ zones, libc will expect the clock to be POSIX.  I
suggest installing the right/ zones.

>    server 195.58.103.125, stratum 2, offset -22.037324, delay 0.04967
...
>    ntpdate thinks
>    1) the client is in sync with ntp.oops.se
>    2) the client is 22 secs behind ntp.utfors.se

I think it must be that ntpdate thinks the client is 22 seconds ahead
of ntp.utfors.se (i.e., the "offset" is the server's offset relative
to the client), because:

>    sntpclock/clockview thinks
>    1) the client is 22 secs behind ntp.oops.se
>    2) the client is in sync with ntp.utfors.se

Which is reported less ambiguously.

> As I wrote, our server ntp.oops.se has the right/ zone files installed. I
> noticed however that zoneinfo/Europe/Stockholm and right/Europe/Stockholm
> is binary equivalent. I don't know if this matters.

Odd.

> The server use sntpclock to synchronize with ntp.utfors.se.

So ntp.oops.se's system clock is 22 + the clock of ntp.utfors.se, but
it's supposed to be that way, because ntp.utfors.se has a POSIX clock
and ntp.oops.se has a TAI clock.

> The client use ntpd to synchronize with ntp.oops.se.

ntpd as a client assumes that both the local and remote clocks are
POSIX, and makes the client's clock hold the same value at the same
time as the server's clock.  So the client now has a TAI clock, since
that's what the server has (even though ntpd doesn't know it).

For Bennett: if the client is an appliance and you can't install
right/ zones, the client will be 22 seconds ahead.  To fix that,
you'll have to patch the server to remove leap seconds from the system
clock to produce a publishable NTP time.

> Is this an effect of the client not using the right/ zone files?

Yes.

> Why doesn't the client see the same difference to ntp.oops.se and
> ntp.utfors.se?

I'm guessing that you're misinterpreting the ntpdate output; see
above.  But maybe I'm wrong.  Try installing and using the right/
zones, and see what ntpdate says then.


paul