Time synchronisation
======================
There are 2 main NTP rpms availalable:
ntp – recommended for machines that are constantly connected to a network and are normally running 24/7.
chrony – recommended for machines that are not running 24/7 or have intermitent network, e.g. mobile phones.
Also performs well on machine that are constantly connected to a network and are normally running 24/7
Related Command
===============
yum install chrony
timedatectl
timedatectl set-timezone Asia/Bangkok
timedatectl set-ntp yes
timedatectl set-ntp true
To view a list of trusted ntp servers that the chronyd is using to sync the system-time.
chronyc sources -v
chronyc tracking
systemctl enable chronyd
systemctl start chronyd
systemctl status chronyd
If your system clock is correct,
but your hardware-clock is wrong,
then
you can update the hardware clock using the hwclock command:
hwclock --systohc
/etc/chrony.conf
================
The makestep directive can be used to allow chronyd to step the clock.
makestep 1 3
the clock would be stepped in the first three updates if its offset was larger than one second.
Normally, it’s recommended to allow the step only in the first few updates,
but in some cases (e.g. a computer without an RTC or virtual machine
which can be suspended and resumed with an incorrect time)
it may be necessary to allow the step on any clock update.
The example above would change to
makestep 1 -1
ref:
https://serverfault.com/questions/819467/chrony-time-synchronization-on-huge-time-diff
https://codingbee.net/rhcsa/ntp-keeping-system-time-in-sync-on-centos-rhel-7
Wednesday, June 22, 2022
Redhat Time synchronisation by Chrony
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment