Mailinglist Archive: opensuse (3156 mails)

< Previous Next >
Re: [opensuse] ntp can not manage to put the clock in sync.
  • From: "Carlos E. R." <robin.listas@xxxxxxxxxxxxxx>
  • Date: Sat, 8 Dec 2007 03:58:56 +0100 (CET)
  • Message-id: <alpine.LSU.0.9999.0712080342210.12992@xxxxxxxxxxxxxxxx>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1



The Friday 2007-12-07 at 18:26 -0800, Joseph Loo wrote:

It does sound like your driftfile is messed up.

Which one? There are two.

/var/lib/ntp/drift/ntp.drift? Certainly it is. I did try removing it to
force NTP to recalculate it. No effect.

/etc/adjtime? No. And has no effect during system use.


My understanding the ntp.drift is the one one that contains the
information for the drift with the adjtime used for the cmos. I could be
wrong though.


No...

There is a file, '/etc/adjtime', which holds a correction applied to the time read from the cmos clock when the system boots, to compensate for the known estimated error of the cmos clock while the computer was powered off.

Ie, if the computer was off 20 hours, and the cmos, battery powered, clock errors 0.1"/h, then the time will be corrected by 2 seconds before setting the system time.

This file is not touched by ntpd; it is calculated and written by hwclock.


Then, there is another file, '/var/lib/ntp/drift/ntp.drift', which holds the drift compensation currently applied by ntpd to the system or cpu time, in parts per million. Ie, the speed of the system clock is modified and calculated continuously. Well, not continuously, but when the ntpd daemon sees fit. This compensation does not apply to the CMOS clock, which is independent.


The trick of deleting '/etc/adjtime' is used when the time is wrong right after booting, and in every boot, to force the computer to recalculate a new factor. It has no effect once the computer is running and the hour is set by whatever means; it will have effect on the next boot.

That is not the problem I'm having, thus deleting that file will have no effect.

- -- Cheers,
Carlos E. R.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.4-svn0 (GNU/Linux)

iD8DBQFHWgh7tTMYHG2NR9URAmUqAJ0dVw50Lq1Thmua/EEhW+Q7vsAA8gCdEmCd
06HQw+MjQ+32FecJoooWdtw=
=4N+i
-----END PGP SIGNATURE-----
--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx

< Previous Next >