1 |
On Friday 18 Mar 2016 09:38:50 Håkon Alstadheim wrote: |
2 |
> On 03/17/2016 11:31 PM, Mick wrote: |
3 |
> > On Friday 18 Mar 2016 06:01:17 Bill Kenworthy wrote: |
4 |
> >> On 18/03/16 05:59, Bill Kenworthy wrote: |
5 |
> >>> On 18/03/16 05:14, Alan McKinnon wrote: |
6 |
> >>>> On 17/03/2016 22:02, Håkon Alstadheim wrote: |
7 |
> >>>>> On 03/17/2016 02:03 PM, Bill Kenworthy wrote: |
8 |
> >>>>>> On 17/03/16 20:26, Alan McKinnon wrote: |
9 |
> >>>>>>> On 17/03/2016 08:50, Håkon Alstadheim wrote: |
10 |
> >>>>>>>> I have a server SUPPOSED to be running 24/7, but every once in a |
11 |
> >>>>>>>> while |
12 |
> >>>>>>>> during a prolonged absence the box will go down. The Real Time |
13 |
> >>>>>>>> Clock |
14 |
> >>>>>>>> will drift, and in the rush to get the box up again I let |
15 |
> >>>>>>>> everything |
16 |
> >>>>>>>> boot up automatically and get both wrong time on the main systems, |
17 |
> >>>>>>>> and |
18 |
> >>>>>>>> different times on the various systems. |
19 |
> >>>>>>>> |
20 |
> >>>>>>>> My setup has a main server which does NTP, but with no direct link |
21 |
> >>>>>>>> to |
22 |
> >>>>>>>> the outside. Router&firewall /have/ to be booted booted later (dumb |
23 |
> >>>>>>>> setup, don't ask), after which I can finally get correct time from |
24 |
> >>>>>>>> NTP. |
25 |
> >>>>>>>> |
26 |
> >>>>>>>> NTP initiates "11 minute mode", which makes /etc/adjtime useless as |
27 |
> >>>>>>>> far |
28 |
> >>>>>>>> as I understand. Anybody have a /correct/ way to account for RTC |
29 |
> >>>>>>>> drift |
30 |
> >>>>>>>> on a box running ntpd? Right now I have a ---file in |
31 |
> >>>>>>>> /etc/cron.d/time-bad like so: |
32 |
> >>>>>>>> * * * * * root adjtimex -S 5 >/dev/null 2>&1 </dev/null |
33 |
> >>>>>>>> --- |
34 |
> >>>>>>>> |
35 |
> >>>>>>>> Combined with an old-fashioned setup for hwclock during boot and |
36 |
> >>>>>>>> shutdown. This feels really wrong, and I have no idea what I am |
37 |
> >>>>>>>> doing. |
38 |
> >>>>>>>> |
39 |
> >>>>>>>> TLDR: Anybody have a /correct/ way to account for RTC drift on a |
40 |
> >>>>>>>> box |
41 |
> >>>>>>>> running ntpd? |
42 |
> >>> |
43 |
> >>> Have you looked at adjtimex ... its in portage |
44 |
> >>> |
45 |
> >>> From the man page ... |
46 |
> >>> |
47 |
> >>> "For a standalone or intermittently connected machine, where it’s not |
48 |
> >>> ossible to run ntpd, you may use adjtimex instead to correct the sys-tem |
49 |
> >>> clock for systematic drift. |
50 |
> >>> |
51 |
> >>> There are several ways to estimate the drift rate. If your |
52 |
> >>> |
53 |
> >>> computer can be connected to the net, you might run ntpd for at least |
54 |
> >>> several hours and run "adjtimex --print" to learn what values of tick |
55 |
> >>> and freq it settled on. Alternately, you could estimate values using as |
56 |
> >>> a reference the CMOS clock (see the --compare and --adjust switches), |
57 |
> >>> another host (see --host and --review), or some other source of time |
58 |
> >>> (see --watch and --review). You could then add a line to rc.local |
59 |
> >>> invoking adjtimex, or configure /etc/init.d/adjtimex or |
60 |
> >>> /etc/default/adjtimex, to set those parameters each time you reboot." |
61 |
> >>> |
62 |
> >>> Used it at one time for dialup which approximates your condition. |
63 |
> >>> |
64 |
> >>> BillK |
65 |
> >> |
66 |
> >> forget it ... I forgot that's where you started from ... must be getting |
67 |
> >> old :( |
68 |
> > |
69 |
> > Nobody mentioned net-misc/chrony. Would it be more appropriate for this |
70 |
> > use case? |
71 |
> |
72 |
> I see it also claims to contain an ntp server. I'll check it out. |
73 |
|
74 |
I have found that when RTC starts playing up the BIOS MoBo battery probably |
75 |
needs replacing. Have you tried changing it/measuring its voltage? |
76 |
|
77 |
-- |
78 |
Regards, |
79 |
Mick |