Context:
Centos 7.0
chronyc (chrony) version 3.1 (+READLINE +IPV6 +DEBUG)
Issue
I want to find a way to force chronyd to change the hardware clock instantly without waiting.
The program chronyd
is currently running on my machine :
[root@localhost ~]# ps -ef | grep chronyd
chrony 599 1 0 21:59 ? 00:00:00 /usr/sbin/chronyd
root 6710 4779 0 22:31 pts/0 00:00:00 grep --color=auto chron
chronyd
is actually configured this way in the file /etc/chrony.conf
:
# Record the rate at which the system clock gains/losses time.
driftfile /var/lib/chrony/drift
# Allow the system clock to be stepped in the first three updates
# if its offset is larger than 1 second.
makestep 1.0 3
# Enable kernel synchronization of the real-time clock (RTC).
rtcsync
# Enable hardware timestamping on all interfaces that support it.
hwtimestamp *
# Increase the minimum number of selectable sources required to adjust
# the system clock.
#minsources 2
# Allow NTP client access from local network.
allow 192.168.0.0/16
# Ignore stratum in source selection.
stratumweight 0
# Specify directory for log files.
logdir /var/log/chrony
# Select which information is logged.
#log measurements statistics tracking
pool chronos.univ-brest.fr
The NTP host the machine is currently asking is chronos.univ-brest.fr
and the machine is able to ping it :
[root@localhost ~]# ping chronos.univ-brest.fr
PING chronos.univ-brest.fr (195.83.247.18) 56(84) bytes of data.
64 bytes from chronos.univ-brest.fr (195.83.247.18): icmp_seq=1 ttl=239 time=38.3 ms
64 bytes from chronos.univ-brest.fr (195.83.247.18): icmp_seq=2 ttl=239 time=38.7 ms
The only similar post i found does not solve my problem https://stackoverflow.com/questions/49730407/how-to-resynchronize-with-chrony
The current date on the machine is the following :
[root@localhost ~]# date
jeu. févr. 2 22:40:21 CET 1978
I would like find a way to force chronyd
to change the hardware clock
instantly to the date given by the NTP host.