In the real time application, which OpenRemote usually is, it is very important to have clocks synchronized so they do not drift away too much. Nowadays, computers have usually a cheap real time clock hardware which can easily drift even few seconds in 24h! You can check easily how your machines are in sync with the date command. Below is example of running this command on my LAN:
michal@rutek06 ~> date; ssh ds date; ssh root@orb date;
Mon Oct 6 11:35:21 CEST 2014
Mon Oct 6 11:35:21 CEST 2014
Mon Oct 6 11:35:21 CEST 2014
It is run from my Mac, I have a Synology NAS with alias ds and OpenRemote eBox with alias orb. As you can see, all they are pretty good in sync. To achieve this the Network Time Protocol (NTP) is used. Follow these steps in order to configure ntp on the OpenRemote eBox (NAS configuration is quite similar):
- Login to ebox with:
# ssh root@orb - Install
ntp:# apt-get update# apt-get install ntp
This will runntpd. However there is a problem as thentpdcan sometimes exit due to the following: once the clock has been set an error grater than 1000s will causentpdto exit anyway. - Therefore edit
ntp.confand addtinker panic 0line to it:# vi /etc/ntp.confq
itinker panic 0[Enter][ESC]:w - By default eBox is configured to sync its time once when the network interface comes up using
ntpdate. This can can cause racing withntpdresulting in intermittent shutting down ofntpd. To get rid of this you can either uninstallntpdateor addexit 0as 2nd line to the startup configuration file:# vi /etc/network/if-up.d/ntpdate
jiexit 0[Enter][ESC]:wq - Now it time to check the date:
# date
Sometimes a time zone need to be set correctly. For setting the time zone to Central European Time (CET) please do the following:# ln -sf /usr/share/zoneinfo/CET /etc/localtime
In case the time zone is still not correct:# apt-get install tzdata
After this you would never worry again about clock synchronization across controllers. IMHO this should be the default OpenRemote eBox configuration.















