Gentoo Archives: gentoo-user

From: Dale <rdalek1967@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Latest unstable ntp not generating ntp.drift file.
Date: Sun, 09 Jan 2011 00:56:20
Message-Id: 4D290299.2020603@gmail.com
In Reply to: Re: [gentoo-user] Latest unstable ntp not generating ntp.drift file. by Peter Humphrey
1 Peter Humphrey wrote:
2 > On Saturday 08 January 2011 21:45:45 Dale wrote:
3 >
4 >
5 >> Now, with ntp, it logs to messages when it syncs, resets the clock
6 >> and such. Does chrony do this somewhere too? I have this in my
7 >> conf file:
8 >>
9 > [...]
10 >
11 >> logdir /var/log/chrony
12 >>
13 > You need to uncomment the next line too - the one that specifies what to
14 > log. Remember that an exclamation mark is a comment marker in
15 > chrony.conf.
16 >
17 >
18 >> Do I have to create a file for it to log to as well?
19 >>
20 > Nope. Just switch logging on, as above. If you have your syslog to
21 > output to VT12 you can read its log output there. In my case I use
22 > syslog-ng with the default config and VT12 switched on.
23 >
24 >
25 >> P. S. I wonder why ntp and openntp didn't work?
26 >>
27 > Haven't a clue, but I do remember shuddering at the complexity of
28 > configuring ntp, years ago. From reading this thread I get the impression
29 > it hasn't improved much since then.
30 >
31 > Here's my chrony.conf, minus comments; gate.ethnet is my gateway box:
32 >
33 > server uk.pool.ntp.org
34 > server gate.ethnet
35 > maxupdateskew 10
36 > driftfile /etc/chrony/chrony.drift
37 > keyfile /etc/chrony/chrony.keys
38 > commandkey 1
39 > dumponexit
40 > dumpdir /var/log/chrony
41 > initstepslew 30 gate.ethnet
42 > logdir /var/log/chrony
43 > log measurements statistics tracking rtc
44 > allow 192.168.2/24
45 > allow 192.168.3/24
46 > allow 192.168.4/24
47 > logchange 0.5
48 > cmdallow 127.0.0.1
49 > rtcfile /etc/chrony/chrony.rtc
50 > rtconutc
51 >
52 > Incidentally, chronyd logs a "cannot open" error the first time it tries
53 > to write to a log or dump file; it seems to be harmless.
54 >
55 > HTH. I'm delighted you got something working!
56 >
57 >
58
59
60 I read the man pages and even used google but the part about what to log
61 didn't register with me. Basically, I need to tell it where to put the
62 log file, which I did, then what I want it to log as well, which I
63 missed. Sort of like the way portage does in make.conf. I didn't catch
64 what the last part meant. I added that to config and restarted it.
65 Will see if that does what I want. I think it will.
66
67 I didn't have to much trouble with ntp the first time. I remember
68 adding the servers to the conf file then doing some other little setting
69 and just starting it as a service. After that, every once in a while I
70 would update the servers. Some of them would drop off and have to many
71 hops or something and just needed to be replaced. I don't recall ever
72 having trouble like this before. Mostly the problems I did have was
73 with the servers disappearing, moving or problems with network delays.
74 It sure failed me this time tho. :-(
75
76 I'm going to try adding a line or two at a time until I get it set right
77 then I'll post my config file in case someone else can use it as a
78 reference.
79
80 Thanks for the help.
81
82 Dale
83
84 :-) :-)

Replies

Subject Author
Re: [gentoo-user] Latest unstable ntp not generating ntp.drift file. Peter Humphrey <peter@××××××××××××××.org>