1 |
On Saturday 08 January 2011 21:45:45 Dale wrote: |
2 |
|
3 |
> Now, with ntp, it logs to messages when it syncs, resets the clock |
4 |
> and such. Does chrony do this somewhere too? I have this in my |
5 |
> conf file: |
6 |
[...] |
7 |
> logdir /var/log/chrony |
8 |
|
9 |
You need to uncomment the next line too - the one that specifies what to |
10 |
log. Remember that an exclamation mark is a comment marker in |
11 |
chrony.conf. |
12 |
|
13 |
> Do I have to create a file for it to log to as well? |
14 |
|
15 |
Nope. Just switch logging on, as above. If you have your syslog to |
16 |
output to VT12 you can read its log output there. In my case I use |
17 |
syslog-ng with the default config and VT12 switched on. |
18 |
|
19 |
> P. S. I wonder why ntp and openntp didn't work? |
20 |
|
21 |
Haven't a clue, but I do remember shuddering at the complexity of |
22 |
configuring ntp, years ago. From reading this thread I get the impression |
23 |
it hasn't improved much since then. |
24 |
|
25 |
Here's my chrony.conf, minus comments; gate.ethnet is my gateway box: |
26 |
|
27 |
server uk.pool.ntp.org |
28 |
server gate.ethnet |
29 |
maxupdateskew 10 |
30 |
driftfile /etc/chrony/chrony.drift |
31 |
keyfile /etc/chrony/chrony.keys |
32 |
commandkey 1 |
33 |
dumponexit |
34 |
dumpdir /var/log/chrony |
35 |
initstepslew 30 gate.ethnet |
36 |
logdir /var/log/chrony |
37 |
log measurements statistics tracking rtc |
38 |
allow 192.168.2/24 |
39 |
allow 192.168.3/24 |
40 |
allow 192.168.4/24 |
41 |
logchange 0.5 |
42 |
cmdallow 127.0.0.1 |
43 |
rtcfile /etc/chrony/chrony.rtc |
44 |
rtconutc |
45 |
|
46 |
Incidentally, chronyd logs a "cannot open" error the first time it tries |
47 |
to write to a log or dump file; it seems to be harmless. |
48 |
|
49 |
HTH. I'm delighted you got something working! |
50 |
|
51 |
-- |
52 |
Rgds |
53 |
Peter. Linux Counter 5290, 1994-04-23. |