• 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 6 : How to force a NTP sync with the NTP server(s)

by admin

This post briefly outlines how one can force a ntp (Network Time Protocol) sync with the ntp servers defined in the /etc/ntp.conf configuration file. This will not work if there are no ntp servers defined in the /etc/ntp.conf, this can be verified using :

# grep ^server /etc/ntp.conf

This document is useful when the date gets reset e.g. by a hardware maintenance such as a motherboard replacement.

Steps to force NTP sync

1. Stop the ntpd service :

# service ntpd stop

2. Force an update :

# ntpd -gq

-g – requests an update irrespective of the time offset
-q – requests the daemon to quit after updating the date from the ntp server.

3. restart the ntpd service :

# service ntpd start

Filed Under: Linux

Some more articles you might also be interested in …

  1. Understanding the /etc/exports File
  2. How to allow only specific non-root user(s) to use crontab
  3. hdparm Command Examples in Linux
  4. CentOS / RHEL 6 : How to disable Transparent Huge pages (THP)
  5. Common NFS mount options in Linux
  6. Linux Interview Questions : Open Files / Open File Descriptors
  7. CentOS / RHEL : How to delete LVM volume
  8. How to delete unused kernels and keep only the running kernel in CentOS/RHEL
  9. TIME_WAIT queue troubles
  10. /proc/cpuinfo file explained

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