1 |
On Thursday 06 January 2011, Dale wrote: |
2 |
> Francesco Talamona wrote: |
3 |
> > On Wednesday 05 January 2011, Dale wrote: |
4 |
> >> Now on my old system, it would adjust the drift file and the |
5 |
> >> adjustments would get smaller and smaller. On the new rig, as |
6 |
> >> you can see it stays about the same. I would like it to get to a |
7 |
> >> point where it doesn't have to sync so often. I read on the |
8 |
> >> website where they are needing more servers to help with the load |
9 |
> >> and I don't want to be one of the ones putting a load on it. |
10 |
> > |
11 |
> > Maybe you copied over /etc/adjtime from the previous machine. I |
12 |
> > would try to regenerate it... |
13 |
> > |
14 |
> > Ciao |
15 |
> > |
16 |
> > Francesco |
17 |
> |
18 |
> I'm sure I didn't copy that. I copied ntp.conf but that is all. I |
19 |
> didn't even notice that one being there. I got to see what purpose |
20 |
> that has. |
21 |
> |
22 |
> I may delete it tho and see what happens. It would generate a new |
23 |
> one if I restart the service correct? |
24 |
> |
25 |
> Dale |
26 |
> |
27 |
> :-) :-) |
28 |
|
29 |
It makes the hardware clock take care of the systematic drift. If a |
30 |
wrong value is stored in it, it can interfere with ntp in the way you |
31 |
described: every time ntp runs it always corrects for the same amount. |
32 |
|
33 |
From man 8 hwclock: |
34 |
|
35 |
"The Hardware Clock is usually not very accurate. However, much of |
36 |
its inaccuracy is completely predictable - it gains or loses the same |
37 |
amount of time every day. |
38 |
This is called systematic drift. hwclock's "adjust" function |
39 |
lets you make systematic corrections to correct the systematic drift." |
40 |
|
41 |
and: |
42 |
"It is good to do a hwclock --adjust just before the hwclock --hctosys |
43 |
at system startup time, and maybe periodically while the system is |
44 |
running via cron." |
45 |
|
46 |
This is my "recipe": |
47 |
let ntpdate sync your clock, then /sbin/hwclock --systohc |
48 |
and you are done. From that moment on ntp takes care of the non |
49 |
systematic error, while the drift is zeroed "by hwclock". |
50 |
|
51 |
Somewhere it is suggested to run /sbin/hwclock --adjust once a year. |
52 |
|
53 |
I experienced what you describe when I built my new machine, I had |
54 |
copied /etc/adjtime (without knowing what it was) from the previous, it |
55 |
took me a good deal of googling... |
56 |
|
57 |
BTW I don't have ntp.drift, I only use ntpdate and the clock is always |
58 |
correct. |
59 |
|
60 |
HTH |
61 |
Francesco |
62 |
|
63 |
-- |
64 |
Linux Version 2.6.36-gentoo-r6, Compiled #2 SMP PREEMPT Mon Jan 3 |
65 |
11:54:58 CET 2011 |
66 |
Two 1GHz AMD Athlon 64 Processors, 4GB RAM, 4021.84 Bogomips Total |
67 |
aemaeth |