Hi,
Thanks for the answer.
Comments inline below.
Il 04/08/2015 11:00, Miroslav Lichvar ha scritto:
On Mon, Aug 03, 2015 at 10:56:51PM +0200, Mauro Condarelli wrote:
Absolute precision is not a requirement, I can tolerate errors of several
seconds, but I cannot leave clocks to drift and rely on manual
resynchronization.
My current /etc/chrony.conf is:
===============================
server 0.it.pool.ntp.org
server 1.it.pool.ntp.org
server 2.pool.ntp.org
server 3.pool.ntp.org
logdir /var/log/chrony
log statistics measurements tracking
driftfile /var/lib/chrony/drift
keyfile /etc/chrony.keys
generatecommandkey
makestep 10 3
maxupdateskew 100.0
dumponexit
dumpdir /var/lib/chrony
rtconutc
rtcautotrim 1
rtcfile /var/lib/chrony/rtc
===============================
This, however, is far from being optimal for (at least) two reasons
1. If, for any reason (e.g.: battery disconnection), the RTC loses the right
time Date is severely (several years) in the past for minutes, even if the
system is connected to the Internet.
You can speed up the initial synchronization by adding the iburst
option to the server lines, or use the initstepslew directive. You
may also want to start chronyd with the -s option so it sets the
system clock from RTC with compensated drift.
I'll try, but explicit examples would be welcome, as I am a first-time user of
chrony.
2. In the above event, after several minutes, chrony announces it is going to step by
several million seconds (as expected); shortly thereafter system dies... somewhat; i.e.:
serial console and ssh are completely unresponsive, but "ping" gets an answer.
Nothing is logged.
Hm, that's odd. Can you reproduce the problem by stepping the clock
manually with the date command, e.g. date -s '+ 1000000 sec' ?
not exactly.
I have the following log (interspersed are commads given via ssh on another
connection):
Aug 4 20:19:16 ok-cash daemon.info avahi-daemon[555]: Registering new address
record for 192.168.7.102 on eth0.IPv4.
Aug 4 20:19:16 ok-cash daemon.info avahi-daemon[555]: Registering HINFO record
with values 'ARMV5TEJL'/'LINUX'.
Aug 4 20:19:17 ok-cash daemon.info avahi-daemon[555]: Server startup complete.
Host name is ok-cash.local. Local service cookie is 2363394918.
Aug 4 20:19:18 ok-cash auth.info sshd[569]: Server listening on 0.0.0.0 port
22.
Aug 4 20:19:18 ok-cash daemon.info avahi-daemon[555]: Service "ok-cash"
(/etc/avahi/services/ssh.service) successfully established.
Aug 4 20:19:18 ok-cash daemon.info avahi-daemon[555]: Service "ok-cash"
(/etc/avahi/services/sftp-ssh.service) successfully established.
Aug 4 20:19:29 ok-cash auth.info sshd[577]: Accepted password for mcon from
192.168.7.124 port 16309 ssh2
Aug 4 20:19:32 ok-cash authpriv.notice sudo: mcon : TTY=pts/0 ;
PWD=/home/mcon ; USER=root ; COMMAND=/bin/su -
Aug 4 20:19:32 ok-cash auth.notice su: + /dev/pts/0 mcon:root
Aug 4 20:21:50 ok-cash daemon.info chronyd[494]: Selected source
193.204.114.233
Aug 4 20:22:23 ok-cash daemon.info chronyd[494]: Trimming RTC, error = -37.392
seconds
Aug 4 20:22:49 ok-cash daemon.info chronyd[494]: Trimming RTC, error = -3.106
seconds
Aug 4 20:23:32 ok-cash daemon.info chronyd[494]: Trimming RTC, error = -4.693
seconds
Aug 4 20:24:15 ok-cash daemon.info chronyd[494]: Trimming RTC, error = -5.170
seconds
Aug 4 20:24:57 ok-cash daemon.info chronyd[494]: Trimming RTC, error = -4.649
seconds
/ # date -s '2025-01-07'
Tue Jan 7 00:00:00 CET 2025
Jan 7 00:00:00 ok-cash daemon.warn chronyd[494]: Forward time jump detected!
Jan 7 00:00:00 ok-cash daemon.info chronyd[494]: Can't synchronise: no
reachable sources
Jan 7 00:02:55 ok-cash daemon.info chronyd[494]: Selected source 192.71.245.44
Jan 7 00:02:55 ok-cash daemon.info chronyd[494]: Selected source 212.45.144.206
Jan 7 00:02:55 ok-cash daemon.info chronyd[494]: Selected source
193.204.114.233
Jan 7 00:02:56 ok-cash daemon.info chronyd[494]: Trimming RTC, error = -21.945
seconds
Jan 7 00:03:37 ok-cash daemon.info chronyd[494]: Trimming RTC, error = -5.648
seconds
Jan 7 00:04:18 ok-cash daemon.info chronyd[494]: Trimming RTC, error = -5.348
seconds
As You see it takes about 3 min to resync... but date is not really corrected.
I do not really understand these very large errors; shouldn't they decrease?
TiA
Mauro
--
To unsubscribe email chrony-users-requ...@chrony.tuxfamily.org
with "unsubscribe" in the subject.
For help email chrony-users-requ...@chrony.tuxfamily.org
with "help" in the subject.
Trouble? Email listmas...@chrony.tuxfamily.org.