[LinuxPPS] Reoirt on linuxPPS.

William S. Brasher billb958 at door.net
Mon Oct 26 05:10:59 CET 2009


On Sun, 25 Oct 2009, clemens at dwf.com wrote:

> This is a report on the current patch
>         ntp-pps-2.6.31-rc1


There is a new patch available:

http://ml.enneenne.com/pipermail/linuxpps/2009-October/003368.html




> applied to 
> 	linux-2.6.31.5
> on a
>         3GHz Pentium 4
> running
>         Fedora 11
> 
> I am running with ntp version
>         ntp-4.2.5p234-RC
> 
> which I compiled under the above linux.
> I have also copied timepps.h and pps.h from 2.6.35.5 to the /usr/include
> (I dont think that pps.h is necessary,- mabe for one of my diagnostics... 
> 
> ---
> 
> In any case, the linuxPPS has the problem mentioned in previous notes to this
> list, in that with only ASSERT set, I am seeing both ASSERT and CLEAR events.
> This is not a really big problem for the oncore driver, tho it causes an error
> message every second when the CLEAR event is seen.  My e-mail about this 
> problem came too late for it to have been fixed in the current patch.
> 
> ---
> 
> The reason for going to Fedora11 was to get to glibc 2.10.1, and it is my
> understanding that to get nanosecond timing you need this library.
> 
> The kernel sources do have
> 
> 	#define SHIFT_PLL 2
> 
> in timex.h, which was also one of the things that was mentioned as being
> desirable.  
> 
> Interestingly, I cant say that I saw any faster 'lock up' of the ntp with this
> variable set from 4 -> 2, than I have seen before.
> 
> ---
> 
> I have been running now for several hours with the above environment,
> and I THOUGHT this was all I needed to get to nano-second timing.  But as 
> far as I can tell, Im still seeing microsecond time.
> 
> How can I tell?
> 
> A grep of my ntp config.h shows the following:
> 
> grep ONCORE config.h
> #define CLOCK_ONCORE 1
> #define ONCORE_SHMEM_STATUS 1
> 
> grep PPS config.h
> /* PPS interface? */
> /* #undef CLOCK_PPS720 */
> /* Do we have the PPS API per the Draft RFC? */
> #define HAVE_PPSAPI 1
> /* #undef HAVE_STRUCT_PPSCLOCKEV */
> /* #undef HAVE_SYS_PPSCLOCK_H */
> /* #undef HAVE_SYS_PPSTIME_H */
> /* #undef HAVE_SYS_TIMEPPS_H */
> #define HAVE_TIMEPPS_H 1
> /* Do we have the TIOCGPPSEV ioctl (Solaris)? */
> /* #undef HAVE_TIOCGPPSEV */
> /* Do we have the TIOCSPPS ioctl (Solaris)? */
> /* #undef HAVE_TIOCSPPS */
> /* #undef PPS */
> /* PARSE kernel PLL PPS support */
> /* #undef PPS_SYNC */
> 
> grep NANO config.h
> /* #undef TICKADJ_NANO */
> /* #undef TICK_NANO */
> 
> is it the NANO variables that are not being set by configure?
> 
> In any case, I would appreciate comments by anyone that has 
> nano-second timing working.
> 
> -- 
>                                         Reg.Clemens
>                                         reg at dwf.com
> 
> 
> 
> _______________________________________________
> LinuxPPS mailing list
> LinuxPPS at ml.enneenne.com
> http://ml.enneenne.com/cgi-bin/mailman/listinfo/linuxpps
> Wiki: http://wiki.enneenne.com/index.php/LinuxPPS_support
> 
> 




The clock_gettime and clock_settime functions have nano second precision 
and are located in librt.  When you configure ntpd you need to tell 
configure to link in librt so it will find these functions.  If configure 
doesn't find these functions, it will use less precise ones.

This seems to work for me:

./configure LDFLAGS=-lrt --prefix=/usr --sysconfdir=/etc --with-binsubdir=sbin


I have not been able to get the development ntpd to work here, even with a 
the latest patch from ntp's bugzilla.  I haven't had time to investigate 
further.

The version ntp-4.2.4p7, though, works fine on all my boxes with a 2.6.31 
kernel and the latest PPS patch ntp-pps-v2.6.31.diff.




More information about the LinuxPPS mailing list