Re: [gentoo-user] ntpd crashing

2012-01-11 Thread Jeff Cranmer
On Tue, 2012-01-10 at 23:57 +, Peter Humphrey wrote:
> On Tuesday 10 January 2012 21:45:21 Jeff Cranmer wrote:
> 
>  
> 
> > Initially, the RTC options were not enabled in my kernel, but even
> after
> 
> > setting these, I'm still getting this error. I'm adding all the
> device
> 
> > drivers as modules and trying again to see if I can remove this
> error.
> 
> > I suspect it is the root cause of my ntp issues.
> 
>  
> 
> It's possible that your kernel is creating /dev/rtc0 instead
> of /dev/rtc. What does ls -d /dev/rt* show?
> 
>  
> 
> -- 
> 
> Rgds
> 
> Peter Linux Counter 5290, 1994-04-23
> 
>  
> 
There's nothing in /dev/rt* :-(




Re: [gentoo-user] ntpd crashing

2012-01-10 Thread Dale

Peter Humphrey wrote:

ls -d /dev/rt*


This is mine:

root@fireball / # ls -dl /dev/rt*
lrwxrwxrwx 1 root root  4 Jan  1 15:39 /dev/rtc -> rtc0
crw--- 1 root root 254, 0 Jan  1 15:39 /dev/rtc0
root@fireball / #

Mine links rtc to rtc0 which should work if the OP have the same.

Dale

:-)  :-)

--
I am only responsible for what I said ... Not for what you understood or how 
you interpreted my words!

Miss the compile output?  Hint:
EMERGE_DEFAULT_OPTS="--quiet-build=n"




Re: [gentoo-user] ntpd crashing

2012-01-10 Thread Peter Humphrey
On Tuesday 10 January 2012 21:45:21 Jeff Cranmer wrote:

> Initially, the RTC options were not enabled in my kernel, but even after
> setting these, I'm still getting this error.  I'm adding all the device
> drivers as modules and trying again to see if I can remove this error.
> I suspect it is the root cause of my ntp issues.

It's possible that your kernel is creating /dev/rtc0 instead of /dev/rtc. 
What does ls -d /dev/rt* show?

-- 
Rgds
Peter   Linux Counter 5290, 1994-04-23


Re: [gentoo-user] ntpd crashing

2012-01-10 Thread W.Kenworthy
What he wants is "tinker panic 0" - see man ntp.conf

Allows a slew below the threshold, and a step at anything over, no
matter how great - works well as long as you are not doing sophisticated
DB stuff (rollbacks).

I am concerned about the rtc error:
try ...
bunyip ~ # ls -al /dev/rtc*
crw--- 1 root root 10, 135 Jan  1 15:54 /dev/rtc
bunyip ~ # 

If no rtc node you need to investigate the kernel options and/or loading
of the relevant module - the options are confusing.

BillK






-Original Message-
From: Jarry 
Reply-to: gentoo-user@lists.gentoo.org
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] ntpd crashing
Date: Tue, 10 Jan 2012 22:42:07 +0100

On 10-Jan-12 22:18, Florian Philipp wrote:

>> Wouldn't it make more sense to get the clock set correctly on bootup
>> with ntpdate, and then have ntpd keep things in line moving forward?
>> Otherwise, every couple hours, you'd have your cron'd ntpddate jumping
>> the clock around. I've had apps get stuck in infinite loops from
>> retrograde clocks, and having it happen at the wrong time during a
>> compile process has its own context-sensitive consequences.
>>
>
> It depends on how bad your clock is. If the skew is too large, ntpd
> cannot keep up, even if you initially set it to the correct time. If
> your clock is too good and doesn't drift, you can just forget ntpd and
> save the RAM for something you actually need.

"step threshold" is 0.128s if default settings for ntpd are used.
If time difference is less, time is corrected using "slewing"
(depending on kernel settings, in my case +/- 0.5ms per second).
If it is more, "stepping" is used instead.

So there is no way ndpd could not keep up. But changing time
with "stepping" might cause problems for some applications
(i.e. dovecot in some previous versions just died). If ntpd
is configured with "tinker step 0", step adjustments never
occur. But if clock is off more than 0.5ms/s, time gets never
synchronised and deviation will keep increasing...

Jarry





Re: [gentoo-user] ntpd crashing

2012-01-10 Thread Dale

Jeff Cranmer wrote:

On Tue, 2012-01-10 at 13:02 -0600, Dale wrote:

Florian Philipp wrote:

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

Two things.  One, you need to set the clock manually since it is s
far off.  I would do this:

ntpdate -b -u pool.ntp.org

then start ntpd.  Second thing, if you are dual booting with windows,
you have to edit the config file to set it correctly:  It is set in
/etc/conf.d/hwclock and it has a message about how to set it.  I think
it is UTC.  It tells you in the file tho.  If it is not in yours, let me
know and I'll post it.

Dale

:-)  :-)


Thanks.

ntpdate -b -u pool.ntp.org synchronised my clock.

My system is not tainted by Windoze, so no problems there.

I'm still a little concerned by the results of hwclock --debug
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.

Initially, the RTC options were not enabled in my kernel, but even after
setting these, I'm still getting this error.  I'm adding all the device
drivers as modules and trying again to see if I can remove this error.
I suspect it is the root cause of my ntp issues.

Jeff




Yea, the command I gave will set the clock and it doesn't care how far 
off it is.  I cranked up a old rig that didn't even have a battery in 
it.  It was set to waay back.  It was literally years off.  When I 
ran that command, it was set.  Then it was a matter of keeping it set.


I forgot to mention, in the same file is two other settings.  I set both 
of mine to yes.  One of them sets it to the correct time from the BIOS 
when it boots and one sets the BIOS during shutdown.  Since you only run 
Linux, that may be a good setting for you too.  I'm Linux only to.


Hope that helps too.

Dale

:-)  :-)

--
I am only responsible for what I said ... Not for what you understood or how 
you interpreted my words!

Miss the compile output?  Hint:
EMERGE_DEFAULT_OPTS="--quiet-build=n"




Re: [gentoo-user] ntpd crashing

2012-01-10 Thread Florian Philipp
Am 10.01.2012 22:42, schrieb Jarry:
> On 10-Jan-12 22:18, Florian Philipp wrote:
> 
>>> Wouldn't it make more sense to get the clock set correctly on bootup
>>> with ntpdate, and then have ntpd keep things in line moving forward?
>>> Otherwise, every couple hours, you'd have your cron'd ntpddate jumping
>>> the clock around. I've had apps get stuck in infinite loops from
>>> retrograde clocks, and having it happen at the wrong time during a
>>> compile process has its own context-sensitive consequences.
>>>
>>
>> It depends on how bad your clock is. If the skew is too large, ntpd
>> cannot keep up, even if you initially set it to the correct time. If
>> your clock is too good and doesn't drift, you can just forget ntpd and
>> save the RAM for something you actually need.
> 
> "step threshold" is 0.128s if default settings for ntpd are used.
> If time difference is less, time is corrected using "slewing"
> (depending on kernel settings, in my case +/- 0.5ms per second).
> If it is more, "stepping" is used instead.
> 
> So there is no way ndpd could not keep up. But changing time
> with "stepping" might cause problems for some applications
> (i.e. dovecot in some previous versions just died). If ntpd
> is configured with "tinker step 0", step adjustments never
> occur. But if clock is off more than 0.5ms/s, time gets never
> synchronised and deviation will keep increasing...
> 
> Jarry
> 

I can't find the counter example I had in mind on the archive now. Since
your explanation sounds sensible, I guess that in that other thread some
configuration issue was also involved or ntpd simply took too long to
skew back to correct time (as the man-page states, this might take 2000s
per second difference).

Regards,
Florian Philipp



signature.asc
Description: OpenPGP digital signature


Re: [gentoo-user] ntpd crashing

2012-01-10 Thread Alan McKinnon
On Tue, 10 Jan 2012 15:59:45 -0500
Michael Mol  wrote:

> > Servers with long uptimes should use ntpd, especially if it's apps
> > timestamp data.
> > Laptops and desktops should instead use ntpdate every one or few
> > hours, that is more suitable for those machines (usually they only
> > care about what the correct time is now).
> > 
> >   
> 
> Wouldn't it make more sense to get the clock set correctly on bootup
> with ntpdate, and then have ntpd keep things in line moving forward?
> Otherwise, every couple hours, you'd have your cron'd ntpddate jumping
> the clock around. I've had apps get stuck in infinite loops from
> retrograde clocks, and having it happen at the wrong time during a
> compile process has its own context-sensitive consequences.

I suppose it all comes down to the quality of the RTC itself. Time
keeping daemons were never written with clocks losing a few seconds an
hour in mind (as such hardware is obviously horribly broken)

This raises one of my long-standing beefs with clocks:

For the price of an average burger I can buy a wristwatch from any old
arb street vendor that is about three seconds a year out. But it is
rather common to find server grade hardware costing three months wages
with pathetic clocks inside.

How come? The silicon in the cheap wristwatch will cost about 20 cents
a pop and they pump them out by the millions.

I'm still looking for a valid reason why crap clocks in expensive
computers are still commonplace...

-- 
Alan McKinnnon
alan.mckin...@gmail.com




Re: [gentoo-user] ntpd crashing

2012-01-10 Thread Jeff Cranmer
On Tue, 2012-01-10 at 13:02 -0600, Dale wrote:
> Florian Philipp wrote:
> > 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 
> 
> Two things.  One, you need to set the clock manually since it is s 
> far off.  I would do this:
> 
> ntpdate -b -u pool.ntp.org
> 
> then start ntpd.  Second thing, if you are dual booting with windows, 
> you have to edit the config file to set it correctly:  It is set in 
> /etc/conf.d/hwclock and it has a message about how to set it.  I think 
> it is UTC.  It tells you in the file tho.  If it is not in yours, let me 
> know and I'll post it.
> 
> Dale
> 
> :-)  :-)
> 
Thanks.

ntpdate -b -u pool.ntp.org synchronised my clock.

My system is not tainted by Windoze, so no problems there.

I'm still a little concerned by the results of hwclock --debug
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.

Initially, the RTC options were not enabled in my kernel, but even after
setting these, I'm still getting this error.  I'm adding all the device
drivers as modules and trying again to see if I can remove this error.
I suspect it is the root cause of my ntp issues.

Jeff






Re: [gentoo-user] ntpd crashing

2012-01-10 Thread Jarry

On 10-Jan-12 22:18, Florian Philipp wrote:


Wouldn't it make more sense to get the clock set correctly on bootup
with ntpdate, and then have ntpd keep things in line moving forward?
Otherwise, every couple hours, you'd have your cron'd ntpddate jumping
the clock around. I've had apps get stuck in infinite loops from
retrograde clocks, and having it happen at the wrong time during a
compile process has its own context-sensitive consequences.



It depends on how bad your clock is. If the skew is too large, ntpd
cannot keep up, even if you initially set it to the correct time. If
your clock is too good and doesn't drift, you can just forget ntpd and
save the RAM for something you actually need.


"step threshold" is 0.128s if default settings for ntpd are used.
If time difference is less, time is corrected using "slewing"
(depending on kernel settings, in my case +/- 0.5ms per second).
If it is more, "stepping" is used instead.

So there is no way ndpd could not keep up. But changing time
with "stepping" might cause problems for some applications
(i.e. dovecot in some previous versions just died). If ntpd
is configured with "tinker step 0", step adjustments never
occur. But if clock is off more than 0.5ms/s, time gets never
synchronised and deviation will keep increasing...

Jarry

--
___
This mailbox accepts e-mails only from selected mailing-lists!
Everything else is considered to be spam and therefore deleted.



Re: [gentoo-user] ntpd crashing

2012-01-10 Thread Florian Philipp
Am 10.01.2012 21:59, schrieb Michael Mol:
> Alan McKinnon wrote:
>> On Tue, 10 Jan 2012 13:02:38 -0600
>> Dale  wrote:
>>
>>> Florian Philipp wrote:
 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 
>>>
>>> Two things.  One, you need to set the clock manually since it is
>>> s far off.  I would do this:
>>>
>>> ntpdate -b -u pool.ntp.org
>>>
>>> then start ntpd.  Second thing, if you are dual booting with windows, 
>>
>> If he dual-boots with Windows then running ntpd at all is pretty
>> pointless.
>>
>> ntpd is designed to take a longish time to correct an offset, and to
>> creep up slowly on the correct time. The primary goal is that every
>> second on the wall-clock between now and when the time is corrected
>> will happen (i.e. it won't suddenly jump to the right time the way
>> ntpdate does). For a laptop/desktop (the only use case that would
>> dual-boot), the machine likely won't be up long enough to correct
>> largish errors.
>>
>> Servers with long uptimes should use ntpd, especially if it's apps
>> timestamp data.
>> Laptops and desktops should instead use ntpdate every one or few hours,
>> that is more suitable for those machines (usually they only care about
>> what the correct time is now).
>>
>>
> 
> Wouldn't it make more sense to get the clock set correctly on bootup
> with ntpdate, and then have ntpd keep things in line moving forward?
> Otherwise, every couple hours, you'd have your cron'd ntpddate jumping
> the clock around. I've had apps get stuck in infinite loops from
> retrograde clocks, and having it happen at the wrong time during a
> compile process has its own context-sensitive consequences.
> 
> 

It depends on how bad your clock is. If the skew is too large, ntpd
cannot keep up, even if you initially set it to the correct time. If
your clock is too good and doesn't drift, you can just forget ntpd and
save the RAM for something you actually need.

Regards,
Florian Philipp



signature.asc
Description: OpenPGP digital signature


Re: [gentoo-user] ntpd crashing

2012-01-10 Thread Michael Mol
Alan McKinnon wrote:
> On Tue, 10 Jan 2012 13:02:38 -0600
> Dale  wrote:
> 
>> Florian Philipp wrote:
>>> 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 
>>
>> Two things.  One, you need to set the clock manually since it is
>> s far off.  I would do this:
>>
>> ntpdate -b -u pool.ntp.org
>>
>> then start ntpd.  Second thing, if you are dual booting with windows, 
> 
> If he dual-boots with Windows then running ntpd at all is pretty
> pointless.
> 
> ntpd is designed to take a longish time to correct an offset, and to
> creep up slowly on the correct time. The primary goal is that every
> second on the wall-clock between now and when the time is corrected
> will happen (i.e. it won't suddenly jump to the right time the way
> ntpdate does). For a laptop/desktop (the only use case that would
> dual-boot), the machine likely won't be up long enough to correct
> largish errors.
> 
> Servers with long uptimes should use ntpd, especially if it's apps
> timestamp data.
> Laptops and desktops should instead use ntpdate every one or few hours,
> that is more suitable for those machines (usually they only care about
> what the correct time is now).
> 
> 

Wouldn't it make more sense to get the clock set correctly on bootup
with ntpdate, and then have ntpd keep things in line moving forward?
Otherwise, every couple hours, you'd have your cron'd ntpddate jumping
the clock around. I've had apps get stuck in infinite loops from
retrograde clocks, and having it happen at the wrong time during a
compile process has its own context-sensitive consequences.




Re: [gentoo-user] ntpd crashing

2012-01-10 Thread Alan McKinnon
On Tue, 10 Jan 2012 13:02:38 -0600
Dale  wrote:

> Florian Philipp wrote:
> > 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 
> 
> Two things.  One, you need to set the clock manually since it is
> s far off.  I would do this:
> 
> ntpdate -b -u pool.ntp.org
> 
> then start ntpd.  Second thing, if you are dual booting with windows, 

If he dual-boots with Windows then running ntpd at all is pretty
pointless.

ntpd is designed to take a longish time to correct an offset, and to
creep up slowly on the correct time. The primary goal is that every
second on the wall-clock between now and when the time is corrected
will happen (i.e. it won't suddenly jump to the right time the way
ntpdate does). For a laptop/desktop (the only use case that would
dual-boot), the machine likely won't be up long enough to correct
largish errors.

Servers with long uptimes should use ntpd, especially if it's apps
timestamp data.
Laptops and desktops should instead use ntpdate every one or few hours,
that is more suitable for those machines (usually they only care about
what the correct time is now).


-- 
Alan McKinnnon
alan.mckin...@gmail.com




Re: [gentoo-user] ntpd crashing

2012-01-10 Thread Dale

Florian Philipp wrote:
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 


Two things.  One, you need to set the clock manually since it is s 
far off.  I would do this:


ntpdate -b -u pool.ntp.org

then start ntpd.  Second thing, if you are dual booting with windows, 
you have to edit the config file to set it correctly:  It is set in 
/etc/conf.d/hwclock and it has a message about how to set it.  I think 
it is UTC.  It tells you in the file tho.  If it is not in yours, let me 
know and I'll post it.


Dale

:-)  :-)

--
I am only responsible for what I said ... Not for what you understood or how 
you interpreted my words!

Miss the compile output?  Hint:
EMERGE_DEFAULT_OPTS="--quiet-build=n"




Re: [gentoo-user] ntpd crashing

2012-01-10 Thread Alex Schuster
Florian Philipp writes:

> Am 10.01.2012 18:43, schrieb Michael Mol:
> > Jeff Cranmer wrote:

> > 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.

Or set NTPD_OPTS="-s" in /etc/conf.d/ntpd, this will set the clock
immediately when ntpd is being started.

Wonko



Re: [gentoo-user] ntpd crashing

2012-01-10 Thread Florian Philipp
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 u5   647   42.229  1800133  
>> 3.020
>> 235-69-67-68.st 130.88.200.6 3 u4   647   47.125  1800132  
>> 1.457
>> clock.team-cymr 172.16.65.22 2 u3   647   50.691  1800132  
>> 0.905
>> sulfur.mednor.n 164.67.62.1942 u1   647   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



signature.asc
Description: OpenPGP digital signature


Re: [gentoo-user] ntpd crashing

2012-01-10 Thread 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 u5   647   42.229  1800133  
> 3.020
> 235-69-67-68.st 130.88.200.6 3 u4   647   47.125  1800132  
> 1.457
> clock.team-cymr 172.16.65.22 2 u3   647   50.691  1800132  
> 0.905
> sulfur.mednor.n 164.67.62.1942 u1   647   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.



Re: [gentoo-user] ntpd crashing

2012-01-10 Thread Jeff Cranmer
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 u5   647   42.229  1800133
3.020
 235-69-67-68.st 130.88.200.6 3 u4   647   47.125  1800132
1.457
 clock.team-cymr 172.16.65.22 2 u3   647   50.691  1800132
0.905
 sulfur.mednor.n 164.67.62.1942 u1   647   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.

Jeff



Re: [gentoo-user] ntpd crashing

2012-01-09 Thread W.Kenworthy
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



-Original Message-
From: Jeff Cranmer 
Reply-to: gentoo-user@lists.gentoo.org
To: gentoo-user@lists.gentoo.org
Subject: [gentoo-user] ntpd crashing
Date: Mon, 09 Jan 2012 16:25:39 -0500

Hi,

Can anyone give me any pointers as to how to diagnose a problem with
ntpd crashing.  My time keeps defaulting to 5 hours earlier than it
should.

There's nothing in dmesg when I do dmesg | grep time, or dmesg | grep
ntp, but /etc/init.d/ntpd status tells me that ntpd has crashed.

Jeff