LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   ntp restarting every night? (https://www.linuxquestions.org/questions/linux-newbie-8/ntp-restarting-every-night-863381/)

anon091 02-17-2011 02:59 PM

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?

acid_kewpie 02-17-2011 03:45 PM

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.

anon091 02-17-2011 03:47 PM

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.

acid_kewpie 02-17-2011 03:51 PM

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.

anon091 02-17-2011 04:11 PM

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


acid_kewpie 02-17-2011 04:14 PM

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.

anon091 02-17-2011 04:22 PM

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?

acid_kewpie 02-18-2011 01:23 AM

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.

anon091 02-18-2011 05:38 AM

thanks Chris!


All times are GMT -5. The time now is 10:52 PM.