Re: timekeeping on jail servers



In response to shinny knight <sh1nny_kn1ght@xxxxxxxxx>:
On Tue, Dec 18, 2007 at 11:02:12AM -0500, Bill Moran wrote:
In response to "Michael W. Lucas" :

Been searching around without results:

Has anyone come up with a decent way to do timekeeping on a jail
server? ntpd(8) binds to all addresses, and I'd rather not do a
ntpdate out of cron.

I'm not entirely sure I comprehend where you're having trouble, Michael,
but we use openntpd on all our systems, specifically because you can
tell it what addresses to bind to.

That would be you don't have my problem. Openntpd will solve my
problem.

Thanks for all the pointers, including the dozen or so private ones!

Hello Michael,

Is there any special reason you do not want to use ntpdate from cron?
Is working fine for me on FreeBSD jail servers.

The reason that is not recommended is that it results in sudden steps
of the clock. Occasionally, these steps go backwards. Software that
is very sensitive to time changes (make processes, database servers,
anything doing calculations WRT time) can break, crash, or work
inaccurately.

ntpd works by speeding up or slowing down the clock to catch up to the
correct time. As a result, it's much less likely to disturb time-
sensitive applications. Also, over time ntpd will tune the clock so
that it is actually ticking correctly, unlike the ntpdate in cron
solution.

For example, if your clock cronically ticks 1 second slow every 5
minutes:
* running ntpdate from cron every five minutes will result in a 1 second
"jump" every time it runs.
* Running ntpd will result in the kernel speeding up the clock so that
it actually ticks correctly.

A lot of people new to ntpd think that it's not working because they
start it and their time is still wrong. If the time is badly wrong when
ntpd starts, it can take quite a while for it to correct it. If you
have a machine that is frequently turned off, ntpdate should be run at
boot to snap the time into correctness, at which point ntpd will keep it
there.

--
Bill Moran
http://www.potentialtech.com
_______________________________________________
freebsd-questions@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Re: ntpq times out if NMEA refclock configured?
    ... I'm trying to add a GPS refclock to my server. ... clock, I'm now using a Garmin GPS25 and the NMEA refclock. ... Running minicom at 4800 Baud with NTPD stopped shows the GPS serial data ... The servers appear to have wildly differing opinions as to what time it is. ...
    (comp.protocols.time.ntp)
  • Re: Set your system clock
    ... I don't see any reason not to just turn off ntpd and let ... >> cron run ntpdate every hour or so. ... >> clock accurate with less net bandwidth and resource usage. ... versions of ntpd do in fact call ntpdate to do that one time crash ...
    (Debian-User)
  • Re: Change the time and date
    ... An alternative is ntpdate. ... server, rather than you doing so against your wristwatch. ... in the case of the majority of the ntpd scripts that I've ... clock to somewhere near the right time before ntp actually starts ...
    (Fedora)
  • Re: ntpd -gq VS ntpdate -B
    ... was different from NTP server time for 60 seconds, ntpdate will step ... If the clock offset is greater than 0.5 seconds (as in the ntpdate ... Unless you deliberately change the default behavior of ntpd ...
    (comp.protocols.time.ntp)
  • Re: synchronization
    ... At the maximum slew rate of 500 parts per million, it will take several hours to bring your clock into synchronization. ... ntpd should set the clock unconditionally at startup; e.g. it should query the servers to find out what time it is and then set your clock to that time. ... Look for servers near you in geographical space and test them for nearness in net space (low round trip delays). ...
    (comp.protocols.time.ntp)