Pocket-E
Jun02

How to force NTP sync in Red Hat Linux

Author // Jim Categories // Quick Notes

How to force NTP sync in Red Hat Linux

So maybe you've done this before...you tell your Red Hat server to use Network Time Protocol..hit Apply and wait expectantly. And then you wait some more and then you just decide that the time being off by 8 hours and 32 minutes is "ok". Here's how you force the sync:

 
#vi /etc/sysconfig/ntpd
 

At the top of the file there will be an OPTIONS variable with something like

 
OPTIONS="-u ntp:ntp -p /var/run/ntpd.pid"
 

Modify it and add the -x parameter:

 
OPTION="-x -u ntp:ntp -p /var/run/ntpd.pid"
 

Then restart the service:

 
#service ntpd restart
 

This will force the ntp daemon to resync every time you restart the service. You can either leave the -x in there permanently or just add it when you need it.

About the Author

Jim

Jim loves hanging out with his friends and having a good time. I mean..he would if he had any friends. But Jim's a loner; A brilliant, misunderstood loner.

Comments (0)

Leave a comment

You are commenting as guest. Optional login below.


Cancel Submitting comment...