This discussion is archived
1 Reply Latest reply: Sep 30, 2013 3:11 AM by rukbat RSS

Best way to snyc time on a Linux machine

975148 Newbie
Currently Being Moderated

I wanted to know which should be the best way to sync time for a linux machine. We have an application server and a database server, both using RHEL 5.8 as the OS. It is important that the time on both these servers match together and also sync with a common time source.  As per my knowledge, these are the 2 ways which can be explained as follows considering the common source as, it can also be assumed that & are the hostnames of the other 2 machines


1) Add a cron job with the command, ntpdate to sync with the time on The cron job could be scheduled once a day something as follows:


* 1 * * * /usr/sbin/ntpdate -b


2) Configure the /etc/ntp.conf on the 2 machines, & to include the line like:




and line




for and vice-versa for


There are few observations in this also:


1) By adding server,  it should be aligning the time with a public time server but would it be reliable?

2) By including the peer, should it help maintaining the time for & to be close to each other. This would mean that the 3 machines in picture including the server would have a time close to each other.


I hope, my question is clear.


Please revert with the reply to my query.




  • Correct Answers - 10 points
  • Helpful Answers - 5 points