Re: [SLUG] NTP Issues - resolved (apparently)

2010-01-23 Thread Kyle

Thanks to all for the suggestions.

It appears it was the deleting of the adjtime file which seems to have 
fixed the prob.



Kind Regards

Kyle


Steffen Schulz wrote:

Did you check /etc/adjtime? Not only will NTP refuse to change the
clock in large steps, it also makes a record of past adjustments to
continually adjust the system clock. (man adjtime)


  


--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


Re: [SLUG] NTP Issues

2010-01-20 Thread Steffen Schulz
On 100121 at 10:00, Kyle wrote:
> However, since then server loses time BIG time. Funny thing is,
> other server in same subnet (also NTP) keeps perfect time. Both
> running CentOS 5.x.

Did you check /etc/adjtime? Not only will NTP refuse to change the
clock in large steps, it also makes a record of past adjustments to
continually adjust the system clock. (man adjtime)

I'd try this:

- kill any ntp server/clients
- delete etc/adjtime and possibly that drift file of yours..
- ntpdate -b good.ntp.server.com.au
- start ntp server


/steffen
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


Re: [SLUG] NTP Issues

2010-01-20 Thread james
On Thursday 21 January 2010 07:24:26 slug-requ...@slug.org.au wrote:
> > Having a bit of an issue at the moment with NTP. Server has been running
> > for nigh on 2-3 years now. NTP was always running and always perfect.
> >
> > Recently had a truck take out power lines in the street and no power for
> > 3-4 hours. Server sits behind somewhat out-of-date, (but still has
> > reserve power) UPS and was shut down in time cleanly.
> >
> > However, since then server loses time BIG time. Funny thing is, other
> > server in same subnet (also NTP) keeps perfect time. Both running CentOS
> > 5.x.
> >
> > Now, could be any number of issues, just looking for some guidance on
> > where to start looking pls? Anyone got any ideas?
> 
> I would start with changing the CMOS battery and seeing if that makes
> a difference.

Guys when saying *something* a few words of explanation is really nice for 
those reading the post.

IMHO this is rubbish, the CMOS is not used after boot, *but* NTP won't fix 
gross errors, being too smart ..

ntpdc -p tells you what your machine is doing
npt logs explain lots

ummm RTM there is a way to stop the daemon, set the time and restart the 
daemon.

also look at the drift file (TBM - TheMan) again. Errors here will surely 
screwup things for a while.

Also hwclock tells you about the CMOS clock

James
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


Re: [SLUG] NTP Issues

2010-01-20 Thread Kyle


Amos Shapira wrote:

2010/1/21 SkoZombie :
  

You've probably done this already, but manually set the time correctly.


Correct, stop the server ("service ntpd stop") then run "ntpdate

server-name" (taking server-name from /etc/ntp.conf), then "service
ntpd start".

You can test status with "ntptrace" and the "peer" command to "ntpq".

--Amos


Probably should've said this in the original post but,

yes, I had stoppped and set the time correctly, 2ce now, and restarted, 
to no avail.


Also an ntpq -pn shows I am finding servers, but they seem to be out 
just as much. As best I can tell, it's the /var/lib/ntp/drift file which 
tells ntp how far out it is.


remote   refid  st t when poll 
reach   delay   offset  jitter

==
+202.174.101.10   216.218.254.202  2 u   11   64  377   42.044   
10.199   4.210
+203.161.129.2 202.83.64.3  3 u   27   64  377   
41.393   16.127   5.334
*121.0.0.41   204.152.184.722 u   34   64  377   
41.6315.0806.665
127.127.1.0  .LOCL.  10 l  -   64  
3770.000 0.000 0.001




Kind Regards

Kyle



--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


Re: [SLUG] NTP Issues

2010-01-20 Thread Ken Foskey
On Thu, 2010-01-21 at 09:43 +1100, Kyle wrote:
> Hi Slug,
> 
> Having a bit of an issue at the moment with NTP. Server has been running 
> for nigh on 2-3 years now. NTP was always running and always perfect.
> 
> Recently had a truck take out power lines in the street and no power for 
> 3-4 hours. Server sits behind somewhat out-of-date, (but still has 
> reserve power) UPS and was shut down in time cleanly.
> 
> However, since then server loses time BIG time. Funny thing is, other 
> server in same subnet (also NTP) keeps perfect time. Both running CentOS 
> 5.x.
> 
> Now, could be any number of issues, just looking for some guidance on 
> where to start looking pls? Anyone got any ideas?


NTP has a limit on how much time it can adjust, it is tiny to stop huge
unexpected jumps for Databases etc.

When the server comes up it will automatically run ntpdate but sometimes
you don't have a network to support the command.  You can run this
command manually to kick start the adjustments.

ntpdate server

ta
Ken

-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


Re: [SLUG] NTP Issues

2010-01-20 Thread Amos Shapira
2010/1/21 SkoZombie :
> On Thu, January 21, 2010 9:43 am, Kyle wrote:
>> However, since then server loses time BIG time. Funny thing is, other
>> server in same subnet (also NTP) keeps perfect time. Both running CentOS
>> 5.x.
>>
>> Now, could be any number of issues, just looking for some guidance on
>> where to start looking pls? Anyone got any ideas?
>
> You've probably done this already, but manually set the time correctly.
> I've found in the past that NTP won't adjust the time if it's too far out.
> If it's been a long way out in the past (eg. due to a failing CMOS battery
> while it was powered off), it may have written this state to a file
> somewhere.

Correct, stop the server ("service ntpd stop") then run "ntpdate
server-name" (taking server-name from /etc/ntp.conf), then "service
ntpd start".

You can test status with "ntptrace" and the "peer" command to "ntpq".

--Amos
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


Re: [SLUG] NTP Issues

2010-01-20 Thread SkoZombie
On Thu, January 21, 2010 9:43 am, Kyle wrote:
> However, since then server loses time BIG time. Funny thing is, other
> server in same subnet (also NTP) keeps perfect time. Both running CentOS
> 5.x.
>
> Now, could be any number of issues, just looking for some guidance on
> where to start looking pls? Anyone got any ideas?

You've probably done this already, but manually set the time correctly.
I've found in the past that NTP won't adjust the time if it's too far out.
If it's been a long way out in the past (eg. due to a failing CMOS battery
while it was powered off), it may have written this state to a file
somewhere.

The other suggestions around testing the machine is still getting NTP
updates are good ideas too.

NTP sure can be a little fickle!

-Sko

-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


Re: [SLUG] NTP Issues

2010-01-20 Thread Kyle

Ben Donohue wrote:
I think from memory you can test whether NTP is working... isn't there 
a "test" button to check it can find an upstream NTP server?
Also check basic network settings... has the gateway setting changed 
or is now missing.

Ben

NTP has a GUI??? What's that called pls (in KDE) ?

Basic network settings haven't changed.


Kind Regards

Kyle

--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


Re: [SLUG] NTP Issues

2010-01-20 Thread Kyle


Harrison Conlin wrote:

On Thu, Jan 21, 2010 at 9:43 AM, Kyle  wrote:
  I would start with changing the CMOS battery and seeing if that makes
a difference.

  
Indeed, but if the server isn't shut down at any time, then the CMOS 
doesn't come into play does it?




Kind Regards

Kyle


--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


Re: [SLUG] NTP Issues

2010-01-20 Thread Ben Donohue
I think from memory you can test whether NTP is working... isn't there a 
"test" button to check it can find an upstream NTP server?
Also check basic network settings... has the gateway setting changed or 
is now missing.

Ben


Kyle wrote:

Hi Slug,

Having a bit of an issue at the moment with NTP. Server has been 
running for nigh on 2-3 years now. NTP was always running and always 
perfect.


Recently had a truck take out power lines in the street and no power 
for 3-4 hours. Server sits behind somewhat out-of-date, (but still has 
reserve power) UPS and was shut down in time cleanly.


However, since then server loses time BIG time. Funny thing is, other 
server in same subnet (also NTP) keeps perfect time. Both running 
CentOS 5.x.


Now, could be any number of issues, just looking for some guidance on 
where to start looking pls? Anyone got any ideas?



--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


Re: [SLUG] NTP Issues

2010-01-20 Thread Harrison Conlin
On Thu, Jan 21, 2010 at 9:43 AM, Kyle  wrote:
> Hi Slug,
>
> Having a bit of an issue at the moment with NTP. Server has been running for
> nigh on 2-3 years now. NTP was always running and always perfect.
>
> Recently had a truck take out power lines in the street and no power for 3-4
> hours. Server sits behind somewhat out-of-date, (but still has reserve
> power) UPS and was shut down in time cleanly.
>
> However, since then server loses time BIG time. Funny thing is, other server
> in same subnet (also NTP) keeps perfect time. Both running CentOS 5.x.
>
> Now, could be any number of issues, just looking for some guidance on where
> to start looking pls? Anyone got any ideas?

I would start with changing the CMOS battery and seeing if that makes
a difference.

-- 
Harrison Conlin
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html