Replace Old NTP Commands With “chronyc” on a Modern Linux

With the migration of Enterprise Linux to ‘chronyd’ ntp clock toolset, some of the more common commands were deprecated, and do not exist anymore.

In this article I will go over the most common uses I have in the context of NTP, and how to address them using ‘chronyc’ command line.

Perform ‘ntpdate’ command

A common tool in our past toolbox was ‘ntpdate, which does not exist anymore. This tool is meant to sync the system clock now(!) regardless of any complex NTP protocol operations, and just set the clock.

In the past, the following command could be used:

ntpdate -u ip.of.time.server

Using chronyc, we could use:

chronyd -q -t 1 'server pool.ntp.org iburst maxsamples 1'

Getting the status of clock sync

To achieve that, run the following command:

chronyc sources -v

Syncing with Windows Servers

When using ‘ntpd’ with Windows Servers (ADS PDC-emulator role), a specific syntax is required in the ntp.conf file:

tos maxdist 30

For ‘chronyd’, the following line needs to be added in /etc/chrony.conf:

maxdistance 16.0

You might want to modify the value of maxdistance to a larger values, but this should be a good start

Last words

There are some very advanced operations with chronyd which we mostly do not need. You can check out ‘chronyd’ FAQ page to get some additional operations which might match your own specific needs. For my common needs, these three operations are the common tasks.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.