Am 10.01.2012 18:43, schrieb Michael Mol:
> Jeff Cranmer wrote:
>> On Tue, 2012-01-10 at 13:56 +0800, W.Kenworthy wrote:
>>> Define crashing?
>>>
>>> This looks more like problems with yout TZ variables than ntpd.
>>>
>>> try "ntpq -p" to check if its actually running/locked.  If ntpd is
>>> freewheeling, it is prpbably because your time is too far from lock so
>>> it will silently fail (default config).
>>>
>>> If ntpd has really crashed (ps aux will confirm), try running the daemon
>>> manually from a console - if it "segfaults" or comes up with a missing
>>> library, try "ldd /usr/sbin/ntpd" to find which lib is needed and fix.
>>>
>>> BillK
>>>
>> ntpd -p returns:
>> ntpq: read: Connection refused
>>
>> /etc/init.d/ntpd status returns:
>> * status: crashed
>>
>> /etc/init.d/ntpd stop returns
>> * Caching service dependencies
>> ...                                                                          
>>                                                                              
>>                                       
>> [ ok ]
>> * Stopping ntpd ...
>> * start-stop-daemon: no matching processes found
>>
>> I tried running /usr/sbin/ntpd from a console, and nothing much happens.
>> There now appears to be a process running for ntpd, but my time is still
>> wrong.
>>
>> ps -aux shows
>> root     21470  0.0  0.0  26140  1908 ?        Ss   07:22   0:00
>> /usr/sbin/ntpd
>>
>> ntpq -p now returns
>>      remote           refid      st t when poll reach   delay   offset 
>> jitter
>> ==============================================================================
>> ntp.cox.net     .GPS.            1 u    5   64    7   42.229  1800133  
>> 3.020
>> 235-69-67-68.st 130.88.200.6     3 u    4   64    7   47.125  1800132  
>> 1.457
>> clock.team-cymr 172.16.65.22     2 u    3   64    7   50.691  1800132  
>> 0.905
>> sulfur.mednor.n 164.67.62.194    2 u    1   64    7   88.498  1800131  
>> 2.870
>>
>> After a few minutes, I repeated ntpq -p, and got connection refused. 
>> The program is crashed.  No error messages appear in the command window.
>>
>> The offset is large, which may be why it's crashing.  There may be some
>> problem setting the hardware clock, since I had an error on bootup
>> stating that I was unable to set the hardware clock by any method until
>> I set clock_systohc="NO"
>> in /etc/conf.d/hwclock (which just prevents it trying to set the
>> hardware clock). 
>>
>> hwclock --debug output may be useful:
>> hwclock from util-linux 2.20.1
>> hwclock: Open of /dev/rtc failed: No such file or directory
>> No usable clock interface found.
>> hwclock: Cannot access the Hardware Clock via any known method.
> 
> No kidding the offset is large. If you just sent this email a few
> minutes ago. The email's send date is "Tue, 10 Jan 2012 07:33:49 -0500".
> The mail server which received it logged it as on "Tue, 10 Jan 2012
> 10:33:53 -0700", which suggests you're about five hours off.
> 
> Hm. That sounds like your tz (-0500) is being applied twice.
> 

Besides, ntpd does not correct such large differences. It is not
designed to do this, especially on a running system. Activate
/etc/init.d/ntp-client. It will set the clock so that ntpd can keep it
in sync afterwards. You can start ntp-client on a running system but it
might lead to funny errors or crashes of applications. Better add it to
runlevel default and restart.

Regards,
Florian Philipp

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to