Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have two embedded system that are connected via ethernet. I want them to run synchronously. Using NTP protocol is an option to synchronize them. But this is a isolated system. I don't have an Internet connection. Is it possible to use ntp protocol locally. One of my system will be the master and the other one will be slave.

Kind regards...

share|improve this question

2 Answers 2

up vote 3 down vote accepted

Yes. You need a NTP server on the local LAN. There's two things here - accurate time (e.g. the time is actually correct) and time sync (they all have the same time, whether correct or not).

If you just need the systems to simply be in sync, to agree on what the time is even if they're not using the correct time, you can just install a cheap box with your favourite Linux distro, configure it to act as a time server (example) and tell both these embedded systems to use that as their time source.

If you need accurate time then you need a GPS or radio time clock, which will set time to an external source without needing an Ethernet connection. This is the one I use, for example, but there are others out there.

share|improve this answer
    
@symcbean, This is an embedded system so that I'm able to use only two 600-800Mhz embedded single board computer becouse of system limits. I'm going to use a RTOS like QNX, VxWorks or RTLinux. Would it be use too much resource if I install ntpd to one of my boards? What whould you do? –  zontragon Mar 5 '13 at 12:55
    
@zontragon I think you'd have to test the workload on the system introduced by adding ntpd - this is why i'd favour using a 3rd box (heck it can be something small like a raspberry pi) to handle this kind of misc 'admin' work precisely to keep it off your embedded devices. If they need to use a RTOS then it follows that the extra workload and extra risk of the ntpd process hanging aren't trivial matters in your case in the way they are for most of us working with 'conventional' servers. It might also be that the RTOS implementations of ntpd only function as clients, not servers. –  RobM Mar 5 '13 at 15:03

Even on a single machine which only has intermittent access to a higher stratum time server, NTP can keep the clock correct by tracking the drift of the system clock from actual time (and applying adjustments). It just needs to be connected some of the time so it can learn what the drift is (drift may vary depending on other factors such as ambient temperature, battery status etc, which NTP can't account for).

In your case, with 2 machines, it's perfectly pssible to have one machine taking it's timestamps from another machine - but both machines will become increasingly out of sync with real time.

You can get cheap radio clocks and GPS dongles which will provide accurate time measurement readable by your computer (which with NTP you'd only need to provision on a single system).

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.