• 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

How to configure NTP to fall back to local system clock source in CentOS/RHEL

by admin

This post describes how to configure the ntpd service to utilize the local system clock source in the event of connectivity loss to upstream NTP time sources. This can be useful for Oracle RAC or other clustered environments where peer nodes may fence (restart) as a result of time inconsistency across a cluster.

To cater for potential loss of connectivity with upstream NTP servers, the local system clock can be added as a fallback clock source in the NTP configuration.

Using the fudge command to add the local clock as a stratum 15 server ensures the local clock will not be used unless connection with upstream NTP servers is lost.

Perform the following to accomplish the task:

1. Append the following lines to NTP configuration file /etc/ntp.conf:

server 127.127.1.1
fudge 127.127.1.1 stratum 15

2. Check the time reported by the hardware clock. For example:

# /usr/sbin/hwclock -r; date

If the time reported by the hardware clock is the same as that from the current system time (via the date(1) command), restart the ntpd service.

If not, set the hardware clock from the current NTP-synchronised system time as follows, then restart the ntpd service:

# /usr/sbin/hwclock -w

3. Restart the NTP service for the changes to take effect:

# service ntpd restart

Filed Under: CentOS/RHEL, Linux

Some more articles you might also be interested in …

  1. How to install and configure MariaDB in CentOS / RHEL 7
  2. What happens in the Background when you execute the “useradd” command under Linux
  3. How to Change Time Interval to Fall Back to Secondary DNS Server in CentOS/RHEL
  4. Change default kernel (boot with old kernel) in CentOS/RHEL/OEL 5 and 6
  5. CentOS / RHEL : Installing and Configuring ASMLib
  6. CentOS / RHEL 7 : How to change the verbosity of debug logs during booting
  7. Understanding the /proc/mounts, /etc/mtab and /proc/partitions files
  8. Setting up an NFS server with Turnkey Linux
  9. Beginners guide to Kernel Module Configuration in Linux
  10. How to configure EPEL repository in OEL 7

You May Also Like

Primary Sidebar

Recent Posts

  • grpck command – Remove corrupt or duplicate entries in the /etc/group and /etc/gshadow files.
  • xxd command – Expressed in hexadecimal form
  • sesearch: command not found
  • macof: command not found

© 2022 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright