[ntp:questions] Re: Some anomalies

Richard B. Gilbert rgilbert88 at comcast.net
Mon Nov 29 15:49:16 UTC 2004

Vaidotas J. wrote:

>recently my office decided to create some QoS monitoring system and the main goal of it's correct results on some tests is precise time synchronization. So we bought few Trimble Acutime 2000 SyncKits and I've conected them at first to my WS and then to project notebook. It;s a little bit pitty, that (as far as i know), that Trimbles Palisade ref clock driver doesn't use ports B output also no PPS usage too ;(
>But anyway, the synchronization is received and so on... After some time, i wrote this veeeery small c program to get the offset value from ntp_adjtime() function for one hour (calling it every 1 second). Here it is:
>#include <sys/timex.h>
>#include <sys/time.h>
>#include <stdio.h>
>int main(){
>int i;
>struct timeval ts;
>struct timex *adjtm; //ntp_adjtime pointeris
>adjtm = (struct timex *)malloc(sizeof(struct timex));
>for (i=0;i<=3600;i++) {
>printf("%i\t%i\n",i, (unsigned int) adjtm->offset);
>} //foras
>And i graphed some results enabling/disabling some kernel functions:
>(gnuplot was used as a ploting engine, with just simple input x,y from file, generated by this smaaaal c program of mine:)
>So in one graph we see that for sometime offset was 0, in some of the graphs (that are wildely absurd) the offset is taken just right after the ntpd is started and other graphs are commented.
>The last graph I think is quite good and stable (that last jump is a mystery to me), but such offset with direct startum0 connected to PC isn't satisfieing. So maybe any ideas/responses to these graphs or some experience using Trimble GPS Acutime? What's the offset with Your Trimble Acutime and the settings of the system that runs it and other things. So if any ideas please help me to get the smallest ofset :) Because rigth now i've no more ideas :)
>PS> The notebook is:
>model name      : Intel(R) Pentium(R) 4 Mobile CPU 1.70GHz
>System parameters:
>Linux ippm 2.6.9 #4 Fri Nov 26 16:39:29 EET 2004 i686 GNU/Linux
>Debian 3.1 distr.
>System has no other processes than ntpd, apache, sshd and the GPS is connected via UST-RS232 converter (no comm port on this notebook).
>Vaidotas J.
>Network engineer,
>dtroit at ktu.lt
My first guess is that you are having problems receiving the satellite 
signals.  Further, I'd say that the times when you show a long run of 
zero offset, you are getting a solid signal from four satellites.  Four 
satellites are necessary and sufficient to solve for latitude, 
longitude, height, and time.

I'm not familiar with your Trimble hardware or the driver for it but; in 
principle, if you know your position accurately you need only one 
satellite to get the time.

Things to check:
1.  Does your antenna have a clear view of the entire sky?  If not, find 
a better location for it.
2.  Use nptq -p and check the "reach" field for your reference clock.  
If it is not 377 you have a problem!
2.  Does your driver allow you to ignore satellites close to the 
horizon?  If so, it may help to enable this feature.

Another possibility is that both Linux and Windows have a reputation for 
losing interrupts!  Losing clock ticks will do horrible things to your 

More information about the questions mailing list