Re: [chrony-users] gpsd, pps and chrony

2011-04-13 Thread Ed W
On 11/04/2011 18:48, Miroslav Lichvar wrote: > On Thu, Apr 07, 2011 at 09:51:26AM +0100, Ed W wrote: >>> It seems to be this commit, merged just few months ago. >>> http://git.kernel.org/?p=linux/kernel/git/x86/linux-2.6-tip.git;a=commitdiff;h=08ec0c58fb8a05d3191d5cb6f5d6f81adb419798 >> >> Ahh, int

Re: [chrony-users] gpsd, pps and chrony

2011-04-11 Thread Miroslav Lichvar
On Thu, Apr 07, 2011 at 09:51:26AM +0100, Ed W wrote: > > It seems to be this commit, merged just few months ago. > > http://git.kernel.org/?p=linux/kernel/git/x86/linux-2.6-tip.git;a=commitdiff;h=08ec0c58fb8a05d3191d5cb6f5d6f81adb419798 > > Ahh, interesting - sadly the Alix has no PM or HPET time

Re: [chrony-users] gpsd, pps and chrony

2011-04-07 Thread Bill Unruh
On Thu, 7 Apr 2011, Ed W wrote: On 06/04/2011 21:58, Miroslav Lichvar wrote: On Wed, Apr 06, 2011 at 07:18:24PM +0100, Ed W wrote: - I see a clear connection between my cpu Mhz as reported in say /proc/cpuinfo (unknown if this source is reliable when processor powersave in use?) and the stable

Re: [chrony-users] gpsd, pps and chrony

2011-04-07 Thread Ed W
On 06/04/2011 21:58, Miroslav Lichvar wrote: > On Wed, Apr 06, 2011 at 07:18:24PM +0100, Ed W wrote: >> - I see a clear connection between my cpu Mhz as reported in say >> /proc/cpuinfo (unknown if this source is reliable when processor >> powersave in use?) and the stable chrony tracking parameter

Re: [chrony-users] gpsd, pps and chrony

2011-04-06 Thread Miroslav Lichvar
On Wed, Apr 06, 2011 at 10:58:24PM +0200, Miroslav Lichvar wrote: > I just made a test with a 2.6.38-rc0 kernel That should have been 2.6.39-rc0. But it should be in 2.6.38 too. $ git describe --contains 08ec0c58fb8a05d3191d5cb6f5d6f81adb419798 v2.6.38-rc1~480^2~1 -- Miroslav Lichvar --- To un

Re: [chrony-users] gpsd, pps and chrony

2011-04-06 Thread Miroslav Lichvar
On Wed, Apr 06, 2011 at 07:18:24PM +0100, Ed W wrote: > - I see a clear connection between my cpu Mhz as reported in say > /proc/cpuinfo (unknown if this source is reliable when processor > powersave in use?) and the stable chrony tracking parameters At least here, MHz in /proc/cpuinfo is affected

Re: [chrony-users] gpsd, pps and chrony

2011-04-06 Thread Ed W
>>> - include a hack I keep in Fedora to force name resolving until it >>> succeeds (enabled by configure option), the problem is with >>> /etc/resolv.conf filled on boot, before network is reachable, which >>> makes getaddrinfo() return a permanent error instead of temporary. >> >> Yes, th

Re: [chrony-users] gpsd, pps and chrony

2011-04-06 Thread Bill Unruh
On Wed, 6 Apr 2011, Ed W wrote: I have investigated this further and in fact lpj set on the kernel command line appears to make *no* difference to chrony's frequency estimation... Curious. In fact this code in tsc_init() is causing the frequency offset to vary: tsc_khz = x86_platform.

Re: [chrony-users] gpsd, pps and chrony

2011-04-06 Thread Miroslav Lichvar
On Tue, Apr 05, 2011 at 11:23:34PM +0100, Ed W wrote: > OK, so I have chrony built in a uclibc chroot with /usr/src/linux holding a > 32bit kernel with HZ set to 1024 (I think). The host is a 64bit kernel with > HZ set to 250 - however, I don't think this should be relevant? > > This is then in

Re: [chrony-users] gpsd, pps and chrony

2011-04-06 Thread Miroslav Lichvar
On Tue, Apr 05, 2011 at 04:23:52PM +0100, Ed W wrote: > > What config error causes chrony to die? The config file is parsed > > before daemon(), but they are not treated as fatal, just warnings. > > Should chrony abort if there are any? > > This does it: > > rtconutc > rtcsync > > >

Re: [chrony-users] gpsd, pps and chrony

2011-04-05 Thread Ed W
> That is not a config error. It is a "hardware" error-- the clock is > irredemably broken. (Fortunately it was just your kernel config that > broke it > so you could recover, but chrony could not) OK, so I have chrony built in a uclibc chroot with /usr/src/linux holding a 32bit kernel with HZ

Re: [chrony-users] gpsd, pps and chrony

2011-04-05 Thread Ed W
On 05/04/2011 16:23, Ed W wrote: > >> What config error causes chrony to die? The config file is parsed >> before daemon(), but they are not treated as fatal, just warnings. >> Should chrony abort if there are any? > > This does it: > > rtconutc > rtcsync > Also, these logs from so

Re: [chrony-users] gpsd, pps and chrony

2011-04-05 Thread Bill Unruh
I am afraid I have never gone into the Linux entrails to figure out how the HZ variable works and how it interacts with chrony. On Tue, 5 Apr 2011, Ed W wrote: That is not a config error. It is a "hardware" error-- the clock is irredemably broken. (Fortunately it was just your kernel config

Re: [chrony-users] gpsd, pps and chrony

2011-04-05 Thread Ed W
> What config error causes chrony to die? The config file is parsed > before daemon(), but they are not treated as fatal, just warnings. > Should chrony abort if there are any? This does it: rtconutc rtcsync syslog says: Apr 5 15:14:11 localhost user.crit chronyd[3385]: Fatal

Re: [chrony-users] gpsd, pps and chrony

2011-04-05 Thread Ed W
Hi On 05/04/2011 12:44, Miroslav Lichvar wrote: > I recently did some statistics on historical data kindly provided by > the pool.ntp.org maintainer. From the offsets collected by the > monitoring server it seems that most of the pool servers are 1-10ms > off. This includes all strata, as stratum

Re: [chrony-users] gpsd, pps and chrony

2011-04-05 Thread Miroslav Lichvar
On Mon, Apr 04, 2011 at 09:44:22PM +0100, Ed W wrote: > Are there any notes on configuration for acting as a public server? Is > anything else needed than "allow" in the config file? Security? > Preventing abuse, particularly denial of service? Are there a known > chunk of users using chrony for p

Re: [chrony-users] gpsd, pps and chrony

2011-04-05 Thread Miroslav Lichvar
On Mon, Apr 04, 2011 at 09:25:01PM +0100, Ed W wrote: > > Since an NMEA ntp client is a stratum 1 and since NMEA has an accuracy > > around > > 10ms (yes, ms, not us) there is no such requirement. Ie, the accuracy of > > stratum 1 clocks varies wildly. > > By implication are you suggesting that yo

Re: [chrony-users] gpsd, pps and chrony

2011-04-05 Thread Bill Unruh
On Tue, 5 Apr 2011, Ed W wrote: On 05/04/2011 16:23, Ed W wrote: What config error causes chrony to die? The config file is parsed before daemon(), but they are not treated as fatal, just warnings. Should chrony abort if there are any? This does it: rtconutc rtcsync Also

Re: [chrony-users] gpsd, pps and chrony

2011-04-05 Thread Miroslav Lichvar
On Mon, Apr 04, 2011 at 09:19:33AM -0700, Bill Unruh wrote: > On Mon, 4 Apr 2011, Ed W wrote: > > > > >Also I would like to investigate contributing 2 servers to the ntp pool. > >I would like to try and use chrony for these... I understand this > >hasn't been done previously, any thoughts? > > >

Re: [chrony-users] gpsd, pps and chrony

2011-04-05 Thread Miroslav Lichvar
On Mon, Apr 04, 2011 at 10:02:41AM -0700, Bill Unruh wrote: > >Oh, my freetime project at the moment is to try and get the GPIO > >interrupts working as a kernel PPS module on the Alix board (hoping to > >get higher accuracy than using a serial port...) This coupled with an > >old Garmin 18 appear

Re: [chrony-users] gpsd, pps and chrony

2011-04-05 Thread Miroslav Lichvar
On Mon, Apr 04, 2011 at 03:15:52PM +0100, Ed W wrote: > OK, so I have been playing with chrony 1.25-git now for a good few days. > I'm using it in an "embedded" development context, so it's getting > rebooted regularly with somewhat varying configurations. So far not > noted anything that's shoul

Re: [chrony-users] gpsd, pps and chrony

2011-04-05 Thread Bill Unruh
On Tue, 5 Apr 2011, Ed W wrote: Hi On 05/04/2011 12:44, Miroslav Lichvar wrote: (They also have a 20hz GPS with decent sensitivity and a GPS/GLONASS hybrid board...) And exactly what would a 20Hz buy you? 20 times more samples could improve the stddev of the calculated mean up to factor

Re: [chrony-users] gpsd, pps and chrony

2011-04-05 Thread Bill Unruh
On Tue, 5 Apr 2011, Miroslav Lichvar wrote: On Mon, Apr 04, 2011 at 10:02:41AM -0700, Bill Unruh wrote: Oh, my freetime project at the moment is to try and get the GPIO interrupts working as a kernel PPS module on the Alix board (hoping to get higher accuracy than using a serial port...) This

Re: [chrony-users] gpsd, pps and chrony

2011-04-05 Thread Bill Unruh
On Tue, 5 Apr 2011, Miroslav Lichvar wrote: On Mon, Apr 04, 2011 at 09:25:01PM +0100, Ed W wrote: (They also have a 20hz GPS with decent sensitivity and a GPS/GLONASS hybrid board...) And exactly what would a 20Hz buy you? 20 times more samples could improve the stddev of the calculated mea

Re: [chrony-users] gpsd, pps and chrony

2011-04-04 Thread Ed W
Hi >> I presume it's somewhat moot in that you are bounded by the limits of >> the various tcp connections, but still seems like the tech is easily >> available and we ought to be trying to get current stratum 1 time >> servers to be syncing within some few 10s of usecs? > > It is a volunteer sy

Re: [chrony-users] gpsd, pps and chrony

2011-04-04 Thread Ed W
On 04/04/2011 18:02, Bill Unruh wrote: > On Mon, 4 Apr 2011, Ed Wildgoose wrote: > >> On 04/04/2011 17:19, Bill Unruh wrote: >>> On Mon, 4 Apr 2011, Ed W wrote: >>> Also I would like to investigate contributing 2 servers to the ntp pool. I would like to try and use chrony for t

Re: [chrony-users] gpsd, pps and chrony

2011-04-04 Thread Ed W
Hi > Since an NMEA ntp client is a stratum 1 and since NMEA has an accuracy > around > 10ms (yes, ms, not us) there is no such requirement. Ie, the accuracy of > stratum 1 clocks varies wildly. By implication are you suggesting that you expect a decent proportion of current pool.ntp.org stratum 1

Re: [chrony-users] gpsd, pps and chrony

2011-04-04 Thread Ed Wildgoose
Hi > The problem is not the serial port interrupt. It is as fast as any > other I > believe. The problem is the time between the interrupt being serviced > by the > kernel, and the program (gpsd) being notified that an interrupt has > occured > and then timestamped. Forgive my ignorance, but does

Re: [chrony-users] gpsd, pps and chrony

2011-04-04 Thread Ed Wildgoose
On 04/04/2011 17:19, Bill Unruh wrote: > On Mon, 4 Apr 2011, Ed W wrote: > >> >> Also I would like to investigate contributing 2 servers to the ntp pool. >> I would like to try and use chrony for these... I understand this >> hasn't been done previously, any thoughts? >> > > My impression is that t

Re: [chrony-users] gpsd, pps and chrony

2011-04-04 Thread Ed W
On 22/03/2011 09:03, Miroslav Lichvar wrote: > On Mon, Mar 21, 2011 at 06:33:33PM +, Ed W wrote: >> On 21/03/2011 17:37, Miroslav Lichvar wrote: >>> BTW, the soon to be released gpsd supports kernel PPS timestamping and >>> also the chrony SOCK protocol, which means that to get PPS samples >>>

Re: [chrony-users] gpsd, pps and chrony

2011-04-04 Thread Bill Unruh
On Mon, 4 Apr 2011, Ed W wrote: On 04/04/2011 18:02, Bill Unruh wrote: On Mon, 4 Apr 2011, Ed Wildgoose wrote: On 04/04/2011 17:19, Bill Unruh wrote: On Mon, 4 Apr 2011, Ed W wrote: Also I would like to investigate contributing 2 servers to the ntp pool. I would like to try and use chrony

Re: [chrony-users] gpsd, pps and chrony

2011-04-04 Thread Bill Unruh
On Mon, 4 Apr 2011, Ed W wrote: Hi Since an NMEA ntp client is a stratum 1 and since NMEA has an accuracy around 10ms (yes, ms, not us) there is no such requirement. Ie, the accuracy of stratum 1 clocks varies wildly. By implication are you suggesting that you expect a decent proportion of c

Re: [chrony-users] gpsd, pps and chrony

2011-04-04 Thread Bill Unruh
On Mon, 4 Apr 2011, Ed Wildgoose wrote: Hi The problem is not the serial port interrupt. It is as fast as any other I believe. The problem is the time between the interrupt being serviced by the kernel, and the program (gpsd) being notified that an interrupt has occured and then timestamped.

Re: [chrony-users] gpsd, pps and chrony

2011-04-04 Thread Bill Unruh
On Mon, 4 Apr 2011, Ed Wildgoose wrote: On 04/04/2011 17:19, Bill Unruh wrote: On Mon, 4 Apr 2011, Ed W wrote: Also I would like to investigate contributing 2 servers to the ntp pool. I would like to try and use chrony for these... I understand this hasn't been done previously, any thoughts?

Re: [chrony-users] gpsd, pps and chrony

2011-04-04 Thread Bill Unruh
On Mon, 4 Apr 2011, Ed W wrote: Also I would like to investigate contributing 2 servers to the ntp pool. I would like to try and use chrony for these... I understand this hasn't been done previously, any thoughts? My impression is that the pool people ONLY allow ntpd in the pool. And they te

Re: [chrony-users] gpsd, pps and chrony

2011-03-22 Thread Miroslav Lichvar
On Mon, Mar 21, 2011 at 06:33:33PM +, Ed W wrote: > On 21/03/2011 17:37, Miroslav Lichvar wrote: > > BTW, the soon to be released gpsd supports kernel PPS timestamping and > > also the chrony SOCK protocol, which means that to get PPS samples > > with nanosecond resolution the PPS refclock won'

Re: [chrony-users] gpsd, pps and chrony

2011-03-22 Thread Miroslav Lichvar
On Mon, Mar 21, 2011 at 01:43:24PM -0700, Bill Unruh wrote: > I cannot remember if chrony allows an offset fudge as > ntpd does--ie telling > chrony that this particular source is always 300ms off. That's what the offset option in the refclock directive does. > I really do not like kernel PPS. I

Re: [chrony-users] gpsd, pps and chrony

2011-03-22 Thread Damien R
> > > Well you suggest that I only need something like that ? > > refclock SHM 1 poll 4 refid PPS > > Yes, that should work fine, as long as a recent gpsd version is used. > I think versions before 2.90 didn't pair the NMEA and PPS samples and > needed chrony/ntp to sync first to the NMEA source an

Re: [chrony-users] gpsd, pps and chrony

2011-03-21 Thread Miroslav Lichvar
On Mon, Mar 21, 2011 at 06:15:57PM +0100, Damien Rigoni wrote: > > PPS and SHM refclocks are very different, the former provides only > > subsecond time information, it needs another source to get the missing > > seconds. The PPS samples received by SHM refclock are already paired > > with NMEA mes

Re: [chrony-users] gpsd, pps and chrony

2011-03-21 Thread Miroslav Lichvar
On Mon, Mar 21, 2011 at 09:16:50AM -0700, Bill Unruh wrote: > Maybe an NMEA source should not be regarded as a stratum 0 clock but rather as > a stratum 1. Its error ( many ms) is far greater than the PPS. Although even > with that error that does not make up for the huge (300 ms or greater) delay

Re: [chrony-users] gpsd, pps and chrony

2011-03-21 Thread Ed W
On 21/03/2011 17:37, Miroslav Lichvar wrote: > BTW, the soon to be released gpsd supports kernel PPS timestamping and > also the chrony SOCK protocol, which means that to get PPS samples > with nanosecond resolution the PPS refclock won't be necessary. Seems there are a bunch of cool projects arou

Re: [chrony-users] gpsd, pps and chrony

2011-03-21 Thread Damien Rigoni
On 21 March 2011 12:58, Miroslav Lichvar wrote: > On Wed, Mar 16, 2011 at 11:36:06AM +0100, Damien R wrote: > > So with the following configuration file for chrony: > > refclock SHM 0 poll 4 refid GPS > > refclock SHM 1 poll 4 refid PPS > > > > chrony cannot synchronize ("Selceted source GPS, Can

Re: [chrony-users] gpsd, pps and chrony

2011-03-21 Thread Bill Unruh
On Mon, 21 Mar 2011, Miroslav Lichvar wrote: On Mon, Mar 21, 2011 at 09:16:50AM -0700, Bill Unruh wrote: Maybe an NMEA source should not be regarded as a stratum 0 clock but rather as a stratum 1. Its error ( many ms) is far greater than the PPS. Although even with that error that does not make

Re: [chrony-users] gpsd, pps and chrony

2011-03-21 Thread Miroslav Lichvar
On Wed, Mar 16, 2011 at 11:36:06AM +0100, Damien R wrote: > So with the following configuration file for chrony: > refclock SHM 0 poll 4 refid GPS > refclock SHM 1 poll 4 refid PPS > > chrony cannot synchronize ("Selceted source GPS, Can't synchronize: no > majority"), but if I comment the 1st or

Re: [chrony-users] gpsd, pps and chrony

2011-03-21 Thread Bill Unruh
On Mon, 21 Mar 2011, Miroslav Lichvar wrote: On Wed, Mar 16, 2011 at 11:36:06AM +0100, Damien R wrote: So with the following configuration file for chrony: refclock SHM 0 poll 4 refid GPS refclock SHM 1 poll 4 refid PPS chrony cannot synchronize ("Selceted source GPS, Can't synchronize: no maj

Re: [chrony-users] gpsd, pps and chrony

2011-03-18 Thread Ed W
On 15/03/2011 09:07, Damien R wrote: > Hi, > > I want to use chrony to synchronize the system clock between two > computers (with no connection between them), each equipped with a gps > (gps emmit a pps). > The computers can run during about 5-8 hours and the gps signal can be > lost. The goal is

Re: [chrony-users] gpsd, pps and chrony

2011-03-18 Thread Bill Unruh
On Fri, 18 Mar 2011, Ed W wrote: On 15/03/2011 09:07, Damien R wrote: Hi, I want to use chrony to synchronize the system clock between two computers (with no connection between them), each equipped with a gps (gps emmit a pps). The computers can run during about 5-8 hours and the gps signal ca

Re: [chrony-users] gpsd, pps and chrony

2011-03-16 Thread Damien R
On 15 March 2011 18:26, Bill Unruh wrote: > Yes, if both are synchronized to gps, then both are synchronized. However > if > one looses the connection to the gps, then it has no way of getting the > time. Yes and when the gps connection is lost, I want to stay on local clock with PPS. Is it n

Re: [chrony-users] gpsd, pps and chrony

2011-03-16 Thread Ed W
On 16/03/2011 10:36, Damien R wrote: > > On 15 March 2011 18:26, Bill Unruh > wrote: > > Yes, if both are synchronized to gps, then both are synchronized. > However if > one looses the connection to the gps, then it has no way of getting > the time. >

Re: [chrony-users] gpsd, pps and chrony

2011-03-16 Thread Bill Unruh
On Wed, 16 Mar 2011, Damien R wrote: On 15 March 2011 18:26, Bill Unruh wrote: Yes, if both are synchronized to gps, then both are synchronized. However if one looses the connection to the gps, then it has no way of getting the time. Yes and when the gps connection is lost, I want to stay

Re: [chrony-users] gpsd, pps and chrony

2011-03-15 Thread Damien R
On 15 March 2011 11:06, Ed W wrote: > On 15/03/2011 09:07, Damien R wrote: > > Hi, > > > > I want to use chrony to synchronize the system clock between two > > computers (with no connection between them), each equipped with a gps > > (gps emmit a pps). > > I guess it's just a mis-phrasing, but if

Re: [chrony-users] gpsd, pps and chrony

2011-03-15 Thread Bill Unruh
On Tue, 15 Mar 2011, Damien R wrote: On 15 March 2011 11:06, Ed W wrote: On 15/03/2011 09:07, Damien R wrote: Hi, I want to use chrony to synchronize the system clock between two computers (with no connection between them), each equipped with a gps (gps emmit a pps). I guess it's just a m

[chrony-users] gpsd, pps and chrony

2011-03-15 Thread Damien R
Hi, I want to use chrony to synchronize the system clock between two computers (with no connection between them), each equipped with a gps (gps emmit a pps). The computers can run during about 5-8 hours and the gps signal can be lost. The goal is to achieve the best clock's synchronization between

Re: [chrony-users] gpsd, pps and chrony

2011-03-15 Thread Ed W
On 15/03/2011 09:07, Damien R wrote: > Hi, > > I want to use chrony to synchronize the system clock between two > computers (with no connection between them), each equipped with a gps > (gps emmit a pps). I guess it's just a mis-phrasing, but if there is no connection between the two machines, ho