Re: NTP not doing its job

From: Ehud Karni (ehud_at_nonexisting.hamakor.org.il)
Date: Wed 30 Apr 2003 - 13:53:54 IDT


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Tue, 29 Apr 2003 20:35:43 +0300, linux_il_at_amos.mailshell.com wrote:
>
> What this program does (from a brief reading of its source) is to
> connect to the daytime port (13) and read the time from there, it
> connects to NTP servers simply because it assumes they have good time.
>
> Its *accuracy* is probably good enough for most people (including me),
> but the lack of use of adjtime and reliance on single server would stir
> me away from it if I can use better alternatives (e.g. the NTP
> protocol).
>
> > > Mind you, a daily cron job of ntpdate will have the same effect. ntpdate
> > > is part of your distro's [x]ntp[d][3|4] package.
> >
> > Agreed - I guess I just liked the idea of this tiny (4k for the zip including
> > binary and source) utility.
>
> ntpdate has a better result even when used through cron - it uses
> adjtime and reads from several servers as configured.

Before I started to use ntp/ntpdate (because of firewall problems),
I used a program I wrote that used the daytime protocol. The program
queried several (5-7) time sources, repeating it 20 times in a row.
It compensated for the travel time (it always dropped the first try
because of routing delays, and assumed equal to/from travel time).
It averaged the adjusted differences of all the queries and if it
was more than 100 ms, it used this value to adjust the machine clock
by calling `adjtime'.

After the Firewall was changed, I used ntpdate to check the accuracy
and it was better than 200ms (usally around 50ms).

That program ran as root (of course) but I knew EXACTLY what it did.

Ehud.

- --
 Ehud Karni Tel: +972-3-7966-561 /"\
 Mivtach - Simon Fax: +972-3-7966-667 \ / ASCII Ribbon Campaign
 Insurance agencies (USA) voice mail and X Against HTML Mail
 http://www.mvs.co.il FAX: 1-815-5509341 / \
 mailto:ehud_at_unix.mvs.co.il Better Safe Than Sorry
-----BEGIN PGP SIGNATURE-----
Comment: use http://www.keyserver.net/ to get my key (and others)

iD8DBQE+r6tBLFvTvpjqOY0RAnhHAJ9qEgbg1knnH0NNewRZLh71kvMv/gCfXtg7
XElbEbiMqEeWlWohctW7oL0=
=SA5m
-----END PGP SIGNATURE-----

=================================================================
To unsubscribe, send mail to linux-il-request_at_linux.org.il with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail linux-il-request_at_linux.org.il



This archive was generated by hypermail 2.1.7 : Mon 06 Oct 2003 - 23:44:27 IST