r11 - 2013-03-15 - 15:32:11 - SteveSmithYou are here: NTP >  Support Web > ConfiguringNTP > ConfiguringRefclocks > ConfiguringTrimblePalisadeAcutimeRefclocks
NTP users are strongly urged to take immediate action to ensure that their NTP daemons are not susceptible to being used in distributed denial-of-service (DDoS) attacks. Please also take this opportunity to defeat denial-of-service attacks by implementing Ingress and Egress filtering through BCP38.

ntp-4.2.8p10 was released on 21 March 2017. It addresses 6 medium- and 5 low-severity security issues, 4 informational security topics, 15 bugfixes, and contains other improvements over 4.2.8p9.

Please see the NTP Security Notice for vulnerability and mitigation details.

Are you using Autokey in production? If so, please contact Harlan - he's got some questions for you.
REFACTOR See ConfiguringTrimblePalisadeAcutimeRefclocksDev for discussion of this topic.

6.1.16. Configuring Trimble Palisade/Acutime Refclocks

This topic explains how to get a Trimble Palisade/Acutime refclock working and points out some tips that will be useful for increasing the accuracy of this refclock when using a Linux kernel based OS.

The first thing todo is to read a refclocks drivers description, which can be found at http://www.eecis.udel.edu/~mills/ntp/html/drivers/driver29.html

6.1.16.1. Getting it working:

  • Connect Synchronization Kits PortA to your machine
  • Link your serial port (usually /dev/ttySX) to /dev/palisadeX. On my laptop there is no serial port, so I used a USB to RS232 converter and, in this case, the device would be /dev/ttyUSBX (the exact device name depends on your system configuration).
  • Add the following lines to ntp.conf. Pay attention to time2 value which enables or disables the event polling mechanism (it depends on your SynchKits firmware version). More details about this flag are in the link mentioned above.
       //replace X with the corresponding serial line number
       server 127.127.29.X
       fudge  127.127.29.X stratum 0
       fudge  127.127.29.X refid GPS   //reference ID - name it as you wish
       fudge  127.127.29.X time1 0.020 //this value may vary depending on the latency acquired through a long antenna or synchkit cable

  • Start ntp server and check for the state off refclock using ntpq cli. Use these simple cli commands: associations and peers. Here's how it looks on my machine:

       ntpq> associations
       ind assID status  conf reach auth condition  last_event cnt
       -----------------------------------------------------------
       1   11388  9614   yes   yes  none  sys.peer   reachable  1
       ntpq> peers
       remote           refid           st t when poll reach   delay   offset  jitter
       ------------------------------------------------------------------------------
       *GPS_PALISADE(0) .GPS.            0 l   30   32  377    0.000    0.000   0.001
  • Keep using ntpd :)

6.1.16.2. Making the clock more accurate

6.1.16.2.1. Min / Max Poll Values

First thing to adjust are the max and min poll values. These values can be added to the refclock driver configuration in your ntp.conf:

       fudge server 127.127.29.x minpoll Y maxpoll Z
By default, the refclock driver uses these values:
       #define TRMB_MINPOLL    4       /* 16 seconds */
       #define TRMB_MAXPOLL    5       /* 32 seconds */

The smallest and largest allowable polling values are 4 (16 seconds) and 17 (1.5 days) respectively.

6.1.16.2.2. APIC support in Linux 2.6.x Kernels

When I searched Google, I found lots of reports that clock is sometimes going crazy when APIC is enabled in the Linux kernel. Try disabling your APIC support.

6.1.16.2.3. ACPI

The next thing I encountered when trying to run ntpd on my laptop was problems caused by ACPI. The first thing to do is to check out known hardware issues and read the mailing list links about that. The simple way to deal with scaling CPU frequency is just to disable the ACPI. I suggest adding this line to your lilo.conf (for grub and other loaders the option may be different):

       append="acpi=off"

6.1.16.2.4. Results

Here are some results describing images with comments what was done to get these results

Some results describing pictures, that were retrieved during ntpd configuration on my laptop

Still no big difference between graphs?

So the achieved accuracy is within the limits described in the refclocks page:

       Platform     Operating System     NTP Sources       Accuracy
       i386 (PC)    Linux                NTP Distribution  10 us

Only on a workstation it's more stable than on my laptop, there are still some hidden features to play with on that.

6.1.16.3. How did I get and graph the data?

I wrote a small C program to get the data:

       #include <sys/timex.h>
       #include <sys/time.h>
       #include <stdio.h>
       int main(){
       int i;               //simple integer for retrieved result count
       struct timex *adjtm; //ntp_adjtime pointer
       adjtm = (struct timex *)malloc(sizeof(struct timex));
       struct timeval ts;
       for (i=0;i<=3600;i++) {
       ntp_adjtime(adjtm);
       printf("%i\t%i\n",i, (unsigned int) adjtm->offset); //print the info (also You can modify to print directly to file)
       sleep(1);               //wait for 1 sec and then retrieve data again (can use even nanosleep-it's up to You)
       } //for
       } //main

Compile and simply run #program > output.file

To draw the graphs I fed the output generated by program above to gnuplot. Here's quick guide of how to do it:

       gnuplot> set terminal png transparent size 1024,400
       gnuplot> set xlabel "time,s"
       gnuplot> set ylabel "offset,us"
       gnuplot> set title "Your title here"
       gnuplot> set output "filename.png"
       gnuplot> plot "output.file",x*0
       gnuplot> quit
You'll have the graph in file filename.png. More info about graphing can be found at http://www.gnuplot.info/help.html

-- VaidotasJanuska - 08 Dec 2004

Related Topics: TrimblePalisadeAcutimeRefclockUsers

Edit | WYSIWYG | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r11 < r10 < r9 < r8 < r7 | More topic actions
 
SSL security by CAcert
Get the CAcert Root Certificate
This site is powered by the TWiki collaboration platform
IPv6 Ready
Copyright & 1999-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors. Ideas, requests, problems regarding the site? Send feedback