ntp frequent time resets - battery dead?

Anton Shterenlikht mexas at bris.ac.uk
Wed Mar 12 19:27:04 UTC 2014


>From cswiger at mac.com Tue Mar  4 20:51:34 2014
>
>Hi--
>
>On Mar 4, 2014, at 1:07 AM, Anton Shterenlikht <mexas at bris.ac.uk> wrote:
>> I see in /var/log/messages:
>> 
>> Mar  4 00:16:40 mech-anton240 ntpd[764]: time reset +0.291030 s
>> Mar  4 00:38:02 mech-anton240 ntpd[764]: time reset +0.344745 s
>> Mar  4 00:57:37 mech-anton240 ntpd[764]: time reset +0.338739 s
>> Mar  4 01:19:45 mech-anton240 ntpd[764]: time reset +0.355020 s
>> Mar  4 01:41:34 mech-anton240 ntpd[764]: time reset +0.365177 s
>> Mar  4 01:58:41 mech-anton240 ntpd[764]: time reset +0.306982 s
>> 
>> and so on.
>> 
>> The correction seems large to me.
>
>Yes, it looks to be about ~1 second per hour.  That's 1:1000 ratio,
>which is getting close to the typical kernel limit on adjtime().
>
>Tweaking the step threshold might help.  Or look into tickadj / ntptime.

Sorry, I don't understand this.
Please elaborate.

>
>> Does this indicate that the battery is dead?
>
>A dead battery usually means that the system won't keep the ToY clock updated
>if the system is off and unplugged.  A PC would indicate BIOS checksum errors
>and reset the ToY clock back to epoch.  I think Suns of that era were still
>using OpenFirmware on EEPROMS which didn't need power to keep their settings.
>
>> This is on a Sun Blade 1500 silver desktop, about 10 years old.
>
>Having the clock run slow (ie, needing the time to be moved forwards) can
>result from interrupt handling issues; if something like a USB controller, or
>storage controller, etc is wonky and generating thousands of interrupts per
>second, the ISR being busy might cause clock interrupts to be lost because
>the kernel is otherwise busy.
>
>That ought to be more common on commodity Intel hardware than on SPARCs; as the
>SPARC v8 and later had several levels of nested interrupt contexts available, IIRC.
>
>Regards,
>-- 
>-Chuck

I had suspected disk problems on this box,
so I replaced both disks, and installed 9.1 release.

The problem actually got worse:

Mar 12 15:19:39 mech-aslap33 kernel: Event timer "tick" frequency 1503000000 Hz quality 1000
Mar 12 15:34:01 mech-anton240 kernel: Event timer "tick" frequency 1503000000 Hz quality 1000
Mar 12 15:34:13 mech-anton240 ntpd[706]: time reset -1.086763 s
Mar 12 15:50:45 mech-anton240 ntpd[706]: time reset +0.780002 s
Mar 12 16:08:45 mech-anton240 ntpd[706]: time reset +0.816043 s
Mar 12 16:26:20 mech-anton240 ntpd[706]: time reset +0.788435 s
Mar 12 16:43:03 mech-anton240 ntpd[706]: time reset +0.774967 s
Mar 12 17:00:24 mech-anton240 ntpd[706]: time reset +0.792823 s
Mar 12 17:17:53 mech-anton240 ntpd[706]: time reset +0.786167 s
Mar 12 17:34:22 mech-anton240 ntpd[706]: time reset +0.769774 s
Mar 12 17:51:34 mech-anton240 ntpd[706]: time reset +0.787633 s
Mar 12 18:08:29 mech-anton240 ntpd[706]: time reset +0.766031 s
Mar 12 18:25:40 mech-anton240 ntpd[706]: time reset +0.786657 s
Mar 12 18:42:47 mech-anton240 ntpd[706]: time reset +0.762096 s
Mar 12 19:00:56 mech-anton240 ntpd[706]: time reset +0.813446 s

Note that after every reboot, there is a large
negative correction, then about 2 sec per hour.

So this indeed looks like some hardware issue,
rather that an OS problem.

Thanks

Anton

>
>



More information about the freebsd-questions mailing list