Time Syncronization

From MiOS
(Difference between revisions)
Jump to: navigation, search
Line 1: Line 1:
The '''Vera '''units use '''rdate '''to synchronize the time. Rdate is a client program which uses the Time protocol. Rdate servers must be running the Time service on port 37. Clients can use either TCP or UDP. This program conforms to RFC 868. The Time Protocol is not related or compatible with Network Time Protocol (RFC 958). This service does one time query and synchronization. Rdate use Time Protocol (RFC858) <u>'''which is not compatibile with ntpclinet/openntp'''</u> Network Time Protocol (RFC958). Time Servers are listenin on port 37 and Network TIme Servers on 123.<br>  
+
The '''Vera '''units use '''rdate '''to synchronize the time. Rdate is a client program which uses the Time protocol. Rdate servers must be running the Time service on port 37. Clients can use either TCP or UDP. This program conforms to RFC 868. The Time Protocol is not related or compatible with Network Time Protocol (RFC 958). This service does one time query and synchronization. Rdate use Time Protocol (RFC858) <u>'''which is not compatibile with ntpclinet/openntp'''</u> Network Time Protocol (RFC958). Time Servers are listenin on port 37 and Network Time Servers on 123.<br>  
  
 
<u>To check the servers used to synchronize time use</u>&nbsp;:<br>  
 
<u>To check the servers used to synchronize time use</u>&nbsp;:<br>  
Line 43: Line 43:
 
'''Creating a local timeserver'''  
 
'''Creating a local timeserver'''  
  
 
+
<br> If you want to create a local time servers you can use '''xinetd '''and you can read more about it here http://ecloud.org/index.php?title=Rdate_server <br>  
If you want to create a local time servers you can use '''xinetd '''and you can read more about it here http://ecloud.org/index.php?title=Rdate_server <br>  
+
  
 
Once all the settings have been made you need to restart '''xinetd '''by using this command&nbsp;:  
 
Once all the settings have been made you need to restart '''xinetd '''by using this command&nbsp;:  

Revision as of 18:50, 22 March 2012

The Vera units use rdate to synchronize the time. Rdate is a client program which uses the Time protocol. Rdate servers must be running the Time service on port 37. Clients can use either TCP or UDP. This program conforms to RFC 868. The Time Protocol is not related or compatible with Network Time Protocol (RFC 958). This service does one time query and synchronization. Rdate use Time Protocol (RFC858) which is not compatibile with ntpclinet/openntp Network Time Protocol (RFC958). Time Servers are listenin on port 37 and Network Time Servers on 123.

To check the servers used to synchronize time use :

rdate -p server

The -p switch prints the date and time.

To set the time from that server use this command:

rdate -l -s server

The -l switch allows for logging results to Syslog, -s sets the system time.


There is no worldwide list of Time servers available. Many, but not all, Network Time Protocol (NTP) servers also serve Time on port 37. There is a list of NTP servers here : http://support.ntp.org/bin/view/Servers/WebHome

The National Institute of Standards and Technology (United States Gov't) offers about a dozen Time servers to the public. Their server list is available here: http://tf.nist.gov/tf-cgi/servers.cgi#

Here is a list of working servers (at this moment):


nist1.aol-va.symmetricom.com
nist1.columbiacountyga.gov
nist1-atl.ustiming.org
nist1-chi.ustiming.org
nist.expertsmi.com
nisttime.carsoncity.k12.mi.us
nist1-lnk.binary.net
wwv.nist.gov
time.nist.gov
utcnist.colorado.edu
utcnist2.colorado.edu
ntp-nist.ldsbc.edu
nist1-lv.ustiming.org
nist-time-server.eoni.com
nist1.aol-ca.symmetricom.com
nist1.symmetricom.com
nist1-sj.ustiming.org
nist1-la.ustiming.org


To test on your Vera unit which servers are working, log in by ssh and then create a new file called timeservers.txt in /tmp with this command :

touch /tmp/timeservers.txt

Then edit it and copy the servers from the list using vim, and then run this command at least 5 times :

while read server; do echo -n "Server $server :"; rdate -p $server && echo "OK" || echo "FAILED"; done < /tmp/timeservers.txt

After that compare the results and pick the servers that only display OK, these will be the most reliable, and then add them to the list here /etc/config/timeserver .

To sync the time use the following command :

 ash -x /usr/bin/sync_time.sh


Creating a local timeserver


If you want to create a local time servers you can use xinetd and you can read more about it here http://ecloud.org/index.php?title=Rdate_server

Once all the settings have been made you need to restart xinetd by using this command :

/etc/init.d/xinetd reload



Personal tools