[nSLUG] Clock drifts badly even when machine is up

George N. White III gnwiii at gmail.com
Sat Jul 2 09:18:40 ADT 2016


On Sat, Jul 2, 2016 at 4:14 AM, Mike Spencer <mspencer at tallships.ca> wrote:

>
> I noticed that my computer clock was off by a large amount so I
> replaced the button battery. (Box is shut- & powered-down at night.)


> Since then, I've checked against time.nrc.ca and found recurring
> excursions.
>
> Today, for example:
>
>     root# date && ntpdate time.nrc.ca && date
>
>     Fri Jul  1 15:16:55 ADT 2016
>     1 Jul 15:16:59 ntpdate[5016]: adjust time server 132.246.11.229
>                     offset 0.259334 sec
>     Fri Jul  1 15:16:59 ADT 2016    ---
>
>     root# date && ntpdate time.nrc.ca && date
>
>     Fri Jul  1 21:19:48 ADT 2016
>     1 Jul 21:19:51 ntpdate[10317]: step time server 132.246.11.229
>                 offset0.727260 sec
>     Fri Jul  1 21:19:51 ADT 2016
>     ---
>
>     root# date && ntpdate time.nrc.ca && date
>
>     Sat Jul  2 02:57:48 ADT 2016
>     2 Jul 03:11:29 ntpdate[14942]: step time server 132.246.11.229
>                    offset 819.078979 sec
>     Sat Jul  2 03:11:29 ADT 2016
>     ---
>
> So, roughly:
>
>      4  sec drift since yesterday, down over night
>      3  sec drift between 15:16 & 21:19 (~6 hrs)
>      13 min drift between 21:19 & 03:11 (~6 hrs)
>
> I played a DVD movie around midnight.  Is there any known problem with
> mplayer or video interfering with the kernel's clock management?
> Allegedly, mplayer consults the RTC but AIUI, the kernel is supposed to
> consult the RTC only at boot
>
> Any other suggestions about why this might be happening?
>
> No, I haven't done exhaustive testing; hoping there's a "well-known"
> answer.
>
> Yes, I set up ntpd but I don't understand it.  The documentation
> doesn't offer simple configs for simple scenarios -- "keep my one
> computer up to date" -- and I have the additional problem that I'm on
> dialup.  So I set up /etc/ppp/ip-{up,down} scripts to start
> /etc/rc.d.rc.ntpd and the stop it. But I don't really know how to tell
> if it's working.  Packets are exchanged every few minutes.  But I
> disabled that last night to see if the problem recurred.  It has and
> 13 min is not "just a tad of drift".
>

ntpd can get confused when used on intermittent connections.  For dailup
or laptops that move around, use chrony <https://chrony.tuxfamily.org/>.
It
should be available as a package for many distros.  It is not hard to
install
from source.


>
> In any case, the big excursion -- 13 min -- seems to have happened
> while I was off-line.
>
> Any suggestions?
> http://nslug.ns.ca/mailman/listinfo/nslug
>

The chrony download page lists distros that have packages.

-- 
George N. White III <aa056 at chebucto.ns.ca>
Head of St. Margarets Bay, Nova Scotia
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nslug.ns.ca/pipermail/nslug/attachments/20160702/bf3826e9/attachment.html>


More information about the nSLUG mailing list