Gentoo Archives: gentoo-user

From: Dale <rdalek1967@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Re: Latest unstable ntp not generating ntp.drift file.
Date: Thu, 06 Jan 2011 17:33:19
Message-Id: 4D25FC72.50201@gmail.com
In Reply to: [gentoo-user] Re: Latest unstable ntp not generating ntp.drift file. by Francesco Talamona
1 Francesco Talamona wrote:
2 > On Thursday 06 January 2011, Dale wrote:
3 >
4 >> Francesco Talamona wrote:
5 >>
6 >>> On Wednesday 05 January 2011, Dale wrote:
7 >>>
8 >>>> Now on my old system, it would adjust the drift file and the
9 >>>> adjustments would get smaller and smaller. On the new rig, as
10 >>>> you can see it stays about the same. I would like it to get to a
11 >>>> point where it doesn't have to sync so often. I read on the
12 >>>> website where they are needing more servers to help with the load
13 >>>> and I don't want to be one of the ones putting a load on it.
14 >>>>
15 >>> Maybe you copied over /etc/adjtime from the previous machine. I
16 >>> would try to regenerate it...
17 >>>
18 >>> Ciao
19 >>>
20 >>> Francesco
21 >>>
22 >> I'm sure I didn't copy that. I copied ntp.conf but that is all. I
23 >> didn't even notice that one being there. I got to see what purpose
24 >> that has.
25 >>
26 >> I may delete it tho and see what happens. It would generate a new
27 >> one if I restart the service correct?
28 >>
29 >> Dale
30 >>
31 >> :-) :-)
32 >>
33 > It makes the hardware clock take care of the systematic drift. If a
34 > wrong value is stored in it, it can interfere with ntp in the way you
35 > described: every time ntp runs it always corrects for the same amount.
36 >
37 > From man 8 hwclock:
38 >
39 > "The Hardware Clock is usually not very accurate. However, much of
40 > its inaccuracy is completely predictable - it gains or loses the same
41 > amount of time every day.
42 > This is called systematic drift. hwclock's "adjust" function
43 > lets you make systematic corrections to correct the systematic drift."
44 >
45 > and:
46 > "It is good to do a hwclock --adjust just before the hwclock --hctosys
47 > at system startup time, and maybe periodically while the system is
48 > running via cron."
49 >
50 > This is my "recipe":
51 > let ntpdate sync your clock, then /sbin/hwclock --systohc
52 > and you are done. From that moment on ntp takes care of the non
53 > systematic error, while the drift is zeroed "by hwclock".
54 >
55 > Somewhere it is suggested to run /sbin/hwclock --adjust once a year.
56 >
57 > I experienced what you describe when I built my new machine, I had
58 > copied /etc/adjtime (without knowing what it was) from the previous, it
59 > took me a good deal of googling...
60 >
61 > BTW I don't have ntp.drift, I only use ntpdate and the clock is always
62 > correct.
63 >
64 > HTH
65 > Francesco
66 >
67 >
68
69 Well, I tried openntp for a good while last night and it was worse than
70 ntp. It was adjusting the clock by something like 20 seconds at a
71 time. Even ntp wasn't that bad. I went back to plain ntp. This is
72 what ntp has sent to messages overnight while I was napping:
73
74 Jan 6 00:13:21 localhost ntpd[23712]: ntpd 4.2.6p3@1.2290-o Thu Jan 6
75 05:41:55 UTC 2011 (1)
76 Jan 6 00:13:21 localhost ntpd[23713]: proto: precision = 0.102 usec
77 Jan 6 00:13:21 localhost ntpd[23713]: Listen and drop on 0 v4wildcard
78 0.0.0.0 UDP 123
79 Jan 6 00:13:21 localhost ntpd[23713]: Listen and drop on 1 v6wildcard
80 :: UDP 123
81 Jan 6 00:13:21 localhost ntpd[23713]: Listen normally on 2 lo 127.0.0.1
82 UDP 123
83 Jan 6 00:13:21 localhost ntpd[23713]: Listen normally on 3 eth0
84 192.168.2.5 UDP 123
85 Jan 6 00:13:21 localhost ntpd[23713]: Listen normally on 4 eth0
86 fe80::1e6f:65ff:fe4c:91c7 UDP 123
87 Jan 6 00:13:21 localhost ntpd[23713]: Listen normally on 5 lo ::1 UDP 123
88 Jan 6 00:13:21 localhost ntpd[23713]: peers refreshed
89 Jan 6 00:13:21 localhost ntpd[23713]: Listening on routing socket on fd
90 #22 for interface updates
91 Jan 6 09:09:31 localhost ntpd[23713]: Attempting to register mDNS
92 Jan 6 09:09:31 localhost ntpd[23713]: *** WARNING *** The program
93 'ntpd' uses the Apple Bonjour compatibility layer of Avahi.
94 Jan 6 09:09:31 localhost ntpd[23713]: *** WARNING *** Please fix your
95 application to use the native API of Avahi!
96 Jan 6 09:09:31 localhost ntpd[23713]: *** WARNING *** For more
97 information see <http://0pointer.de/avahi-compat?s=libdns_sd&e=ntpd>
98 Jan 6 09:09:31 localhost ntpd[23713]: mDNS service registered.
99 root@fireball / #
100
101 It doesn't show that it is doing anything but the clock is somewhat
102 accurate but it is still having to adjust it like before. I use ntpdate
103 to see how far the clock is off. If I run it every few minutes, I can
104 see it drift further away from the correct time then when ntp syncs, it
105 resets it again. It did generate the ntp.drift file but it is still not
106 adjusting the clock like on my other rig.
107
108 I also read where the caps USE flag should be enabled. I did but it
109 doesn't appear to have helped any.
110
111 I deleted the /etc/adjtime but it has not been recreated. What creates
112 this file? I deleted it a couple days ago and nothing has brought it
113 back yet.
114
115 I'm about ready to see what Linux would be like with no freaking clock
116 at all. lol Now to see what I am going to try next.
117
118 Dale
119
120 :-) :-)

Replies

Subject Author
[gentoo-user] Re: Latest unstable ntp not generating ntp.drift file. Francesco Talamona <francesco.talamona@××××.eu>
Re: [gentoo-user] Re: Latest unstable ntp not generating ntp.drift file. Neil Bothwick <neil@××××××××××.uk>
Re: [gentoo-user] Re: Latest unstable ntp not generating ntp.drift file. Thanasis <thanasis@××××××××××.org>