[LinuxPPS] cross posting [time-nuts] NTP API on Linux 2.6.26

Folkert van Heusden folkert at vanheusden.com
Sun Jan 11 19:48:24 CET 2009


> > Fedora's ntp rpm patches the makfiles like I posted for -lrt, does that
> > have a similar effect?

added that to my config as well

> > > If you parse through the output from the configure you should see:
> > > checking for clock_gettime... yes
> > > checking for clock_settime... yes

belle:/usr/local/src/ntp-4.2.4p6# grep -i clock_.ettime config.log | sort -u
ac_cv_func_clock_gettime=yes
ac_cv_func_clock_settime=yes
configure:43363: checking for clock_gettime
configure:43363: checking for clock_settime
configure:48512: checking if we'll use clock_settime or settimeofday or stime
configure:48534: result: clock_settime()
| #define HAVE_CLOCK_GETTIME 1
#define HAVE_CLOCK_GETTIME 1
| #define HAVE_CLOCK_SETTIME 1
#define HAVE_CLOCK_SETTIME 1

So I got them too I guess.

> http://sourceware.org/ml/libc-alpha/2008-03/msg00076.html ?  Without this or 
> the ntp patch that Michael Meier posted to the list yesterday 
> http://www.mulder.franken.de/blogfiles/timex.h ntp will only be capable to 
> doing microsecond timing.

Added that to my CFLAGS:
CFLAGS="$CFLAGS -I/usr/local/src/timex.h -I/lib/modules/`uname -r`/build/include -I/lib/modules/`uname -r`/build/Documentation/pps -DHAVE_PPSAPI" LDFLAGS=-lrt ./configure --prefix=/usr/local/ntp --disable-all-clocks --disable-parse-clocks --enable-NMEA --enable-LOCAL-CLOCK

(I first created a directory /usr/local/src/timex.h and then put the timex.h in it)

> When I run ntptime I get: 
> # ntptime
> ntp_gettime() returns code 0 (OK)
>   time cd137e25.947b02a0  Sat, Jan 10 2009 12:05:57.580, (.580002806),
>   maximum error 8294508 us, estimated error 2 us, TAI offset 0
> ntp_adjtime() returns code 0 (OK)
>   modes 0x0 (),
>   offset -0.426 us, frequency -39.298 ppm, interval 1 s,
>   maximum error 8294508 us, estimated error 2 us,
>   status 0x2001 (PLL,NANO),
>   time constant 4, precision 0.001 us, tolerance 500 ppm,

Odd. I still get:

belle:/usr/local/src/ntp-4.2.4p6# /usr/local/ntp/bin/ntptime
ntp_gettime() returns code 5 (ERROR)
  time cd14bd4c.3240a000  Sun, Jan 11 2009 19:47:40.196, (.196299),
  maximum error 9016 us, estimated error 16 us
ntp_adjtime() returns code 5 (ERROR)
  modes 0x0 (),
  offset -26.000 us, frequency -3.138 ppm, interval 1 s,
  maximum error 9016 us, estimated error 16 us,
  status 0x40 (UNSYNC),
  time constant 4, precision 1.000 us, tolerance 500 ppm,


Folkert van Heusden

-- 
Looking for a cheap but fast webhoster with an excellent helpdesk?
http://keetweej.vanheusden.com/redir.php?id=1001
----------------------------------------------------------------------
Phone: +31-6-41278122, PGP-key: 1F28D8AE, www.vanheusden.com



More information about the LinuxPPS mailing list