[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: NSLU2 clock drift

On May 18, 2007, at 6:00 AM, Marcus Better wrote:

my NSLU2 (266 MHz) has a problem with timekeeping. I run ntp, but it doesn't
help - the clock drifts at least fifteen minutes a day. Did I miss
something obvious? My kernel is 2.6.20-1-ixp4xx.



If you're running Debian, you may be able to use the "tickadj" command at boot time to fudge the value of the kernel variable "tick" (the number of microseconds added to the system clock every 1/ HZ seconds when the RTC interrupt occurs).

You should read the man page for "tickadj", but it's mostly all about stuff that doesn't matter here. The important part is that you can modify "tick". Normally (If HZ is set to it's standard value of 100) tick is 10000 (ten thousand microseconds per hundredth of a second).

So, making tick larger, say for example, 10020, will make the system clock run, in this example, 2 parts per thousand ("ppt") faster.

So, if your system clock is 15 minutes slow after a day of free running with NTP turned off (NTP will really confuse things if it's turned on during this part of the experiment) It's running 15/ (24*60) = 10.4 ppt (or 1.04 percent) slow, and you should set tick to approximately 10104.

If the system keeps reasonable time (drift of less than 0.5 ppt) with this adjustment, you can safely turn on NTP again, and it will then keep time as well as your NTP server.


Reply to: