So now we should have our little Unix server running into the WandBoard with SSH running and SFTP of course. Let’s have fun installing NTP client ! First of all we should want have a precise clock. FreeBSD is capable to use NTP protocol as server or client. The protocol is a UDP so it has not data tracking during its path. This we’ll help us in terms of speed and time syncronization. FreeBSD should already come with NTP daemon but in this ARM version is not yet activated as Cron and other services (logging for ex. anyway check before with #top ). Let’s start to edit our /etc/rc.conf adding these two lines of code :
Now we’ll be able to start NTP daemon each time the Wandboard restart itself. But we have to set our NTP server. You can choose one of them in this list http://tf.nist.gov/tf-cgi/servers.cgi . So usually on my servers i use the NIST F1 Atomic Clock located in Boulder, Colorado ,here is a picture of this beast: ( http://en.wikipedia.org/wiki/NIST-F1 )
it’s not the top for my domestic internet access (i have a offset of -5 and a delay of 155 ms that is quite far from 128ms and a “perfect” time synchronization), but for what i have to do here at home it just works.. You can choose anyone (active) from the list before. If it’s not present , let’s add the NTP server sources to the /etc/ntp.conf file, create it with nano , vi or another editor you prefer. This is my personal one: http://www.sidmonitor.net/gallery/ntp.conf .
I’ve just added these two simple lines to the files :
server utcnist.colorado.edu iburst server utcnist2.colorado.edu
So we have two servers. A primary one and a second for backup. The command iburst is needed when the server is unreachable and at each poll interval, send a burst of eight packets instead of the usual one. As long as the server is unreachable, the spacing between packets is about 16s to allow a modem call to complete. Once the server is reachable, the spacing between packets is about 2s. This is designed to speed the initial synchronization acquisition with the server command and s addresses and when ntpd is started with the -q option. OK let’s have a look now on what we have :
The * near ther first server means : current time source the + instead = source selected, included in final set (secondary) , when: number of seconds passed since last response , poll: polling interval, in seconds, for source reach: indicates success/failure to reach source, 377 all attempts successful delay: indicates the roundtrip time, in milliseconds, to receive a reply offset: indicates the time difference, in milliseconds, between the client server and source disp/jitter: indicates the difference, in milliseconds, between two samples.
Of course the final achievable accuracy depends on the time source being used. Basically, no client can be more accurate than its server. In addition the quality of network connection also influences the final accuracy. Slow and non predictable networks with varying delays are very bad for good time synchronization.
You can check the date synchronized with the command :
More on NTP here http://www.ntp.org/ntpfaq/NTP-s-algo.htm
Congratulations! Now you have you FreeBSD server up and running synchronized with a very precise clock. You can start all your activities and have fun!