• Login
Saturday, March 7, 2026
The Cloud Guru
  • Home
  • AWS
  • Data Center
  • GCP
  • Technology
  • Tutorials
  • Blog
    • Blog
    • Reviews
No Result
View All Result
Saturday, March 7, 2026
  • Home
  • AWS
  • Data Center
  • GCP
  • Technology
  • Tutorials
  • Blog
    • Blog
    • Reviews
No Result
View All Result
The Cloud Guru
No Result
View All Result

Configuring NTP using chrony

Team TCG by Team TCG
February 25, 2017
in 2 Minute Tutorials, HOW To's, LINUX, RHEL
0 0
0
Home 2 Minute Tutorials
0
SHARES
30
VIEWS
Share on FacebookShare on Twitter

Chrony provides another implementation of NTP and is designed for systems that are often powered down or disconnected from the network. The main configuration file is /etc/chrony.conf  and parameters are similar to those in the /etc/ntp.conf file.

– chronyd is the daemon that runs in user space.
– chronyc is a command-line program that provides a command prompt and a number of commands.

Examples:
tracking: Displays system time information
sources: Displays information about current sources.

Installing Chrony

Install the chrony package by using the following command:

# yum install chrony

Use the following commands to start chronyd and to ensure chronyd starts at boot time:

# systemctl start chronyd
# systemctl enable chronyd

Configuring Chrony

A sample configuration would look like below :

# cat /etc/chrony.conf 
server a.b.c offline
server d.e.f offline
server g.h.i offline
keyfile /etc/chrony.keys generate
commandkey driftfile /var/lib/chrony/drift makestep 10 3

The parameters are described as follows:
server: Identifies the NTP servers you want to use. The offline keyword indicates that the servers are not contacted until chronyd receives notification that the link to the Internet is present.
keyfile: File containing administrator password. Password allows chronyc to log in to chronyd and notify chronyd of the presence of the link to the Internet.
generatecommandkey: Generates a random password automatically on the first chronyd start.
driftfile: Location and name of file containing drift data.
makestep: Step (start anew) system clock if a large correction is needed. The parameters 10 and 3 would step the system clock if the adjustment is larger than 10 seconds, but only in the first three clock updates.

Although, all these parameters are not required. For this post purpose I am using only below two lines in the configuration file.

# cat /etc/chrony.conf
server 192.0.2.1
allow 192.0.2/24

Starting chrony

Use the systemctl command to start the chrony daemon, chronyd.

# systemctl start chronyd

Verify

To check if chrony is synchronized, use the tracking, sources, and sourcestats commands. Run the chronyc tracking command to check chrony tracking. Alternatively you could run chronyc to display a chronyc> prompt, and then run the tracking command from the chronyc> prompt.

# chronyc tracking 
Reference ID : 192.0.2.1 (192.0.2.1)
Stratum : 12 Ref time (UTC) : Fri Aug 05 19:06:51 2016
System time : 0.000823375 seconds fast of NTP time
Last offset : 0.001989304 seconds
RMS offset : 0.060942811 seconds
Frequency : 1728.043 ppm slow
Residual freq : 1.100 ppm
Skew : 94.293 ppm
Root delay : 0.000207 seconds
Root dispersion : 0.016767 seconds
Update interval : 65.1 seconds
Leap status : Normal

Some of the important fields are :
Reference ID: This is the reference ID and name (or IP address) if available, of the server to which the computer is currently synchronized.
Stratum: The stratum indicates how many hops away from a computer with an attached reference clock you are.
Ref time: This is the time (UT C) at which the last measurement from the reference source was processed.

Run the chronyc sources command to display information about the current time sources that chronyd is accessing.

# chronyc sources 
210 Number of sources = 1
MS Name/IP address Stratum Poll Reach LastRx Last sample =============================================================================
^* 192.0.2.1 11 6 377 63 +1827us[+6783us]...

Some of the fields are described:
M: The mode of the source. ^ means a server, = means a peer, and # indicates
a locally connected reference clock.
S: The state of the sources. “*” indicates the source to which chronyd is currently synchronized. “+” indicates acceptable sources that are combined with the selected source. “-” indicates acceptable sources that are excluded by the combining algorithm. “?” indicates sources to which connectivity has been lost or whose packets do not pass all tests. “x” indicates a clock that chronyd thinks is a false ticker, that is, its time is inconsistent with a majority of other sources. “~” indicates a source whose time appears to have too much variability. The “?” condition is also shown at start-up, until at least three samples have been gathered from it.
Name/IP address: This shows the name or the IP address of the source, or reference ID for reference clocks.

Run the chronyc sourcestats command. This command displays information about the drift rate and offset estimation
process for each of the sources currently being examined by chronyd.

# chronyc sourcestats 210 

Number of sources = 1

Name/IP Address NP NR Span Frequency Freq Skew Offset Std Dev ==================================================================================
192.0.2.1 5 4 259 -747.564 1623.869 -2873us 30ms

Stop chrony

Use the systemctl command to stop the chrony daemon, chronyd.

# systemctl stop chronyd
Tags: 2Min'sHow toLINUX
Previous Post

Create a new swap partition on RHEL system

Next Post

How to change root password in Ubuntu Linux

Team TCG

Team TCG

Related Posts

Architecture

Autoscaling an Instance Group with Custom Cloud Monitoring Metrics

Overview Here, we will create a Compute Engine managed instance group that autoscale based on the value of a custom Cloud Monitoring metric. What...

by Team TCG
October 1, 2023
2 Minute Tutorials

Setting up Jenkins on Kubernetes Engine on GCP

Activate Cloud Shell Cloud Shell is a virtual machine that is loaded with development tools. It offers a persistent 5GB...

by Team TCG
October 1, 2023
Architecture

Create a Highly Available VPC on AWS

Create a Highly Available VPC

by Team TCG
October 1, 2023
AWS

Manually Migrate Data Between Redshift Clusters

You have been presented with a few pain points to solve around your company's Redshift solution. The original Redshift cluster...

by Team TCG
March 3, 2023
AWS

Using Secrets Manager to Authenticate with an RDS Database Using Lambda

Introduction AWS Secrets Manager helps you protect the secrets needed to access your applications, services, and IT resources. The service...

by Team TCG
November 28, 2022
AWS

Work with AWS VPC Flow Logs for Network Monitoring

Monitoring network traffic is a critical component of security best practices to meet compliance requirements, investigate security incidents, track key...

by Team TCG
November 14, 2022
Next Post

How to change root password in Ubuntu Linux

  • Trending
  • Comments
  • Latest

Azure Compliance: Policy, Blueprints, and Compliance Manager

September 21, 2025

Understanding Azure Subscriptions and Resource Groups

December 23, 2024

Azure Sphere: Securing IoT Devices

October 21, 2025

Azure Case Study: How Spotify Uses Azure

January 15, 2025

AWS SnowMobile

0

Passwordless Login Using SSH Keygen in 5 Easy Steps

0

Create a new swap partition on RHEL system

0

Configuring NTP using chrony

0

Cloud Monitoring: CloudWatch vs Azure Monitor vs Operations Suite

December 31, 2025

Infrastructure as Code: CloudFormation vs ARM Templates vs Deployment Manager

December 31, 2025

Cloud CLI Tools: AWS CLI vs Azure CLI vs gcloud

December 30, 2025

Hybrid Cloud Solutions: AWS Outposts, Azure Stack, and GCP Anthos

December 30, 2025

Recommended

Cloud Monitoring: CloudWatch vs Azure Monitor vs Operations Suite

December 31, 2025

Infrastructure as Code: CloudFormation vs ARM Templates vs Deployment Manager

December 31, 2025

Cloud CLI Tools: AWS CLI vs Azure CLI vs gcloud

December 30, 2025

Hybrid Cloud Solutions: AWS Outposts, Azure Stack, and GCP Anthos

December 30, 2025

About Us

Let's Simplify the cloud for everyone. Whether you are a technologist or a management guru, you will find something very interesting. We promise.

Categories

  • 2 Minute Tutorials (7)
  • AI (3)
  • Ansible (1)
  • Architecture (3)
  • Artificial Intelligence (3)
  • AWS (508)
  • Azure (3)
  • books (2)
  • Consolidation (4)
  • Containers (1)
  • Data Analytics (1)
  • Data Center (11)
  • Design (1)
  • GCP (13)
  • HOW To's (17)
  • Innovation (1)
  • Kubernetes (8)
  • LifeStyle (2)
  • LINUX (6)
  • Microsoft (2)
  • news (3)
  • People (4)
  • Reviews (1)
  • RHEL (2)
  • Security (2)
  • Self-Improvement and Professional Development (1)
  • Serverless (2)
  • Social (2)
  • Switch (1)
  • Technology (473)
  • Terraform (3)
  • Tools (1)
  • Tutorials (13)
  • Uncategorized (9)
  • Video (1)
  • Videos (1)

Tags

2Min's (7) Agile (1) AI (5) Appication Modernization (1) Application modernization (1) Architecture (1) AWS (43) AZURE (4) BigQuery (1) books (2) Case Studies (17) CI/CD (1) Cloud Computing (525) Cloud Optimization (1) Comparo (17) Consolidation (1) Courses (1) Data Analytics (1) Data Center (8) Emerging (1) GCP (11) Generative AI (1) How to (14) Hybrid Cloud (5) Innovation (2) Kubernetes (4) LINUX (5) lunch&learn (473) memcache (1) Microsoft (1) monitoring (1) NEWS (2) NSX (1) Opinion (3) SDDC (2) security (1) Self help (2) Shorties (1) Stories (1) Team Building (1) Technology (3) Tutorials (20) vmware (3) vSAN (1) Weekend Long Read (1)
  • About
  • Advertise
  • Privacy & Policy

© 2023 The Cloud Guru - Let's Simplify !!

No Result
View All Result
  • Home
  • AWS
  • HOW To’s
  • Tutorials
  • GCP
  • 2 Minute Tutorials
  • Data Center
  • Artificial Intelligence
  • Azure
  • Videos
  • Innovation

© 2023 The Cloud Guru - Let's Simplify !!

Welcome Back!

Sign In with Facebook
Sign In with Google
Sign In with Linked In
OR

Login to your account below

Forgotten Password?

Create New Account!

Sign Up with Facebook
Sign Up with Google
Sign Up with Linked In
OR

Fill the forms bellow to register

All fields are required. Log In

Retrieve your password

Please enter your username or email address to reset your password.

Log In