Gentoo Archives: gentoo-user

From: Alan McKinnon <alan.mckinnon@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Getting a valid /etc/adjtime while using ntpd ?
Date: Thu, 17 Mar 2016 12:26:45
Message-Id: 56EAA273.9000204@gmail.com
In Reply to: [gentoo-user] Getting a valid /etc/adjtime while using ntpd ? by "Håkon Alstadheim"
1 On 17/03/2016 08:50, Håkon Alstadheim wrote:
2 > I have a server SUPPOSED to be running 24/7, but every once in a while
3 > during a prolonged absence the box will go down. The Real Time Clock
4 > will drift, and in the rush to get the box up again I let everything
5 > boot up automatically and get both wrong time on the main systems, and
6 > different times on the various systems.
7 >
8 > My setup has a main server which does NTP, but with no direct link to
9 > the outside. Router&firewall /have/ to be booted booted later (dumb
10 > setup, don't ask), after which I can finally get correct time from NTP.
11 >
12 > NTP initiates "11 minute mode", which makes /etc/adjtime useless as far
13 > as I understand. Anybody have a /correct/ way to account for RTC drift
14 > on a box running ntpd? Right now I have a ---file in
15 > /etc/cron.d/time-bad like so:
16 > * * * * * root adjtimex -S 5 >/dev/null 2>&1 </dev/null
17 > ---
18 >
19 > Combined with an old-fashioned setup for hwclock during boot and
20 > shutdown. This feels really wrong, and I have no idea what I am doing.
21 >
22 > TLDR: Anybody have a /correct/ way to account for RTC drift on a box
23 > running ntpd?
24 >
25 >
26
27
28 When the box was off, all questions of accurate ntp tracking are moot.
29 ntp is designed around the idea that every second happens but from your
30 machine's point of view they didn't happen since it was powered down.
31
32 I would go the really simple route and force ntpdate to run once during
33 boot up before ntpd is started, thereby avoiding the entire issue.
34 Sometimes correctness really doesn't matter, this looks like one of those.
35
36
37 alan

Replies

Subject Author
Re: [gentoo-user] Getting a valid /etc/adjtime while using ntpd ? Bill Kenworthy <billk@×××××××××.au>