LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-17-2011, 03:59 PM   #1
rjo98
Senior Member
 
Registered: Jun 2009
Location: US
Distribution: RHEL, CentOS
Posts: 1,668

Rep: Reputation: 46
ntp restarting every night?


Looks like on all the servers I've inherited they have a cron job restarting ntp nightly. Is that really necessary, or does it help at all? It seems to fill my messages logs up with extra junk that might not be necessary.

or does ntp really need to be reset every night, or is that how its configured by default?
 
Old 02-17-2011, 04:45 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
A good ntp config should never be reset. A bad one that doesn't do its job due to piss poor config, yeah, sure! Afair when ntp is synced and working really will it still only sync once every 17 hours. And clearly a daily restart isn't going to get you there.
 
Old 02-17-2011, 04:47 PM   #3
rjo98
Senior Member
 
Registered: Jun 2009
Location: US
Distribution: RHEL, CentOS
Posts: 1,668

Original Poster
Rep: Reputation: 46
So how can I tell if mine is setup properly or working right? I'm assuming it was setup to restart nightly to force the time to sync then, but how can I determine if that's really needed?

I guess its not hurting anything other than my messages file being bloated with crap, but figured i'd post anyway.
 
Old 02-17-2011, 04:51 PM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
Well it's nice to do things properly. If you run ntpq -pn you'll see the sync status, so you can see which sources it's trusting and how often it is polling them.
 
Old 02-17-2011, 05:11 PM   #5
rjo98
Senior Member
 
Registered: Jun 2009
Location: US
Distribution: RHEL, CentOS
Posts: 1,668

Original Poster
Rep: Reputation: 46
I changed the IP addresses, but below is the output of that command for me. not sure how to read it though, as well as how it restarting nightly affects these results.


Code:
    remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
+10.9.8.7       172.171.0.1      3 u  772 1024  377    1.273   37.889  23.373
*172.171.0.123    .GPS.            1 u  815 1024  377   32.209    2.006   0.434
 127.127.1.0     LOCAL(0)        10 l    9   64  377    0.000    0.000   0.001

Last edited by Tinkster; 02-17-2011 at 05:25 PM. Reason: replaced QUOTE w/ CODE tags ...
 
Old 02-17-2011, 05:14 PM   #6
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
You're syncing to a strata 1 source, which is hooked up to a GPS time module. And you're doing well with it. You should get more sources really, but all the while the GPS on that box is working, you'll have no problems. 1024 is the period in seconds between polls, and to a limit (maxpoll i tink the parameter is called if it's overridden in /etc/ntp.conf) you'll poll less and less as the software understands how its clock works in terms of losing time compared to a trusted server. I wouldn't expect to need to restart that ever.
 
1 members found this post helpful.
Old 02-17-2011, 05:22 PM   #7
rjo98
Senior Member
 
Registered: Jun 2009
Location: US
Distribution: RHEL, CentOS
Posts: 1,668

Original Poster
Rep: Reputation: 46
it looks like the first line also says its trying to sync to an internal server here i'm guessing, but i'm guessing the plus on the 2nd line means that the preferred source or something along those lines?
 
Old 02-18-2011, 02:23 AM   #8
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
Yeah, the * means the active sync source, the + means the next best which would be used instantly if the first fails. it's probable that the 1st line "refid" is actually syncing to the 2nd line "remote" address, as that would make the stratas make sense.
 
1 members found this post helpful.
Old 02-18-2011, 06:38 AM   #9
rjo98
Senior Member
 
Registered: Jun 2009
Location: US
Distribution: RHEL, CentOS
Posts: 1,668

Original Poster
Rep: Reputation: 46
thanks Chris!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ntp drift file in /etc/ntp instead of /var/lib/ntp - suggestion for a patch in Slack niels.horn Slackware 16 05-07-2009 08:35 PM
A Night of Linux Reidja7 LinuxQuestions.org Member Intro 1 06-07-2007 04:49 AM
NTP cannot work with timeserver, NTP-d can jerryvapps Linux - Networking 0 08-04-2004 03:04 PM
NTP cannot use server, NTP -d can jerryvapps Linux - Newbie 0 07-28-2004 03:22 PM
Silent Night... gnunoob Mandriva 10 03-29-2004 12:07 AM


All times are GMT -5. The time now is 12:30 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration