November 2024
M T W T F S S
 123
45678910
11121314151617
18192021222324
252627282930  

Categories

November 2024
M T W T F S S
 123
45678910
11121314151617
18192021222324
252627282930  

CentOS / RHEL 7 : How to sync chrony to local clock

Question : How to sync chrony to the local clock.

Answer :
When the chrony service starts, there are some settings in the /etc/chrony/chrony.conf file that tells it to actually set the time if specific conditions occur. Below procedure lts you set the local clock as the source for chrony to synchronize the time.

1. Currently the chrony does not sync to local clock and ‘chronyc sources’ command gives the following result :

# chronyc sources
210 Number of sources = 1
MS Name/IP address Stratum Poll Reach LastRx Last sample
===============================================================================
^? localhost
2. Edit /etc/chrony.conf to add the settings below. The configuration file needs atleast 3 of the below entries to have a local clock synchronization.

# vi /etc/chrony.conf
server 127.127.1.0
allow 127.0.0.0/8
local stratum 10
3. Restart chronyd service

# systemctl restart chronyd.service
4. Verify the status of chrony synchronization

# chronyc sources
210 Number of sources = 1
MS Name/IP address Stratum Poll Reach LastRx Last sample
===============================================================================
^* 127.127.1.0 15 6 377 42 -4471ns[ -13us] +/- 204us

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>