• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

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

by admin

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

Filed Under: CentOS/RHEL 7

Some more articles you might also be interested in …

  1. CentOS / RHEL 6,7 : How to use yum history to roll back a yum update
  2. Configuring Remote Logging using rsyslog in CentOS/RHEL
  3. A File Is Claimed to Be Disappearing – How to monitor a file for deletion in Linux
  4. How to Mask or Unmask a Service in CentOS/RHEL 7 and 8
  5. How to Add a 3rd Disk to Create a 3-way Mirror RAID1 MD Device (CentOS/RHEL 7)
  6. Changing the IPset rules from IPtables to Firewalld in CentOS/RHEL 7
  7. How To Migrate Existing Iptables rules to Nftables In CentOS/RHEL 8
  8. CentOS / RHEL 7 : How to install and configure telnet
  9. Understanding System Security Services Daemon (SSSD)
  10. How to troubleshoot iSCSI issues in CentOS / RHEL 6,7

You May Also Like

Primary Sidebar

Recent Posts

  • aws ec2: CLI for AWS EC2 (Command Examples)
  • aws cur – Create, query, and delete AWS usage report definitions (Command Examples)
  • aws configure – Manage configuration for the AWS CLI (Command Examples)
  • aws cognito-idp: Manage Amazon Cognito user pool and its users and groups using the CLI

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright