Gentoo Archives: gentoo-user

From: Alan McKinnon <alan.mckinnon@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] /etc/init.d/: ntpd or ntp-client?
Date: Wed, 04 Feb 2009 15:04:22
Message-Id: 200902041557.28606.alan.mckinnon@gmail.com
In Reply to: [gentoo-user] /etc/init.d/: ntpd or ntp-client? by Stroller
1 On Wednesday 04 February 2009 15:38:11 Stroller wrote:
2 > Before I do any investigation, can someone tell me if my understanding  
3 > so far is correct? Is ntpd supposed to keep the machine's clock in  
4 > constant sync, or is it only (say) a server to offer the date to  
5 > clients? (depending upon the clock being set correctly by other means)  
6 > I thought I had configured ntpd with upstream servers separately from  
7 > ntp-client.
8
9 ntp is one of those things that looks really easy and turns out to be
10 horrendously complicated once you scratch the surface. The problem is not ntp
11 itself, it's the subject of time.
12
13 ntp is indeed both a server for it's host machine and your LAN, but also a
14 client to upstream. It is also full of precautions:
15
16 It will not make your clock jump forwards or backwards if your time is way
17 out. ntp keeps track of how weak your clock spring is and gradually pulls the
18 local clock back into sync with the master clock by making the length of
19 seconds fractionally shorter or longer. It does this so that there are no
20 gaps in the time record. If it suddenly pulled the clock forward, the time
21 tick for midnight might never happen and your crons might not run. I forget
22 what the threshold is, but it's not long; and it can take several hours to
23 correct a clock that is only a few minutes out.
24
25 ntpd is really designed for Unix servers with 3 digit uptimes and clocks not
26 assembled by Mickey Mouse's younger brother (which seems to include all pcs
27 ever made.....)
28
29 Most folk are better off with ntpdate run from a cron. When run, it checks the
30 upstream time and immediately corrects the local clock to that time. Schedule
31 it for once an hour or so, depending on your bandwidth and local ntp site's
32 policies.
33
34 --
35 alan dot mckinnon at gmail dot com

Replies

Subject Author
Re: [gentoo-user] /etc/init.d/: ntpd or ntp-client? Dirk Heinrichs <dirk.heinrichs@××××××.de>