[mythtv-users] Re: mythbackend crashing - solved

Michael T. Dean mtdean at thirdcontact.com
Tue Jul 20 22:59:02 EDT 2004


Ryan Steffes wrote:

> The two real questions I have is whether there is anything I can do 
> about the crashing from ntp,

?   (Don't know.)

> and the other of course being WHY my clock seems like it's getting off 
> so often.

Perhaps your system has recorded an incorrect clock drift rate, so it is 
adjusting time too aggressively (or not aggressively enough--depending 
on direction of drift).  Then, when ntp tries to correct the time 
through skewing--and is never able to catch up--it resorts to skipping 
and causes problems (which would be especially apparent if jumping 
backwards in time).

The system maintains a file /etc/adjtime (or, on FHS-compliant systems, 
/var/lib/hwclock/adjtime), which contains, among other things, a 
systematic clock drift rate (see man 8 hwclock and/or the Clock 
Mini-HOWTO (http://www.tldp.org/HOWTO/Clock.html  )).  The file contains 
three lines.  The first line contains three numbers.  The first number 
of the first line is your systematic drift rate in seconds per day.  If 
this value is very large, it is quite likely incorrect (unless your 
system clock is really broken).  For example, mine is 0.004690.

While this file is automatically updated, it is possible to cause the 
automatic update (which is normally reliable) to write bad values into 
the file through certain actions.  Therefore, if you want to "start over 
from scratch," try removing the bad values.  The easiest way to do this 
is to remove the first two lines (leaving the information about whether 
the RTC is in UTC or local time).  Therefore, your file should consist 
of a single line that says, "UTC" or "LOCAL" (without quotes).

Once you've done this, reboot the system immediately (although a reboot 
is not required, it's much easier to explain than the other steps you 
should take to ensure the update takes effect ;).  Perhaps if this is 
the culprit, it will also cure the instability in your system.

HTH.

Mike



More information about the mythtv-users mailing list