Re: [chrony-users] chrony won't sync to gpsd

[ Thread Index | Date Index | More chrony.tuxfamily.org/chrony-users Archives ]


On Sun, Nov 06, 2011 at 06:19:44PM -0800, Yan Seiner wrote:
> I've been fighting this for a while, and I have no idea what I'm
> doing wrong.
> 
> First off, I have gpsd 2.94 that I am trying to use as a time source
> for chrony.
> 
> The platform is an embedded box with no RTC.  When it boots, I start
> gpsd, set the local clock to the current time using the gps signal,
> and then start chrony.
> 
> Sometimes chrony will sync to gpsd, sometimes it won't.  I can't
> find a pattern or anything useful to diagnose.

I used to have a similar problem when my GPS had bad sky visibility.
Does yours have a stable 3D lock?

On gpsd side you can start try running gpsd -D 5 2>&1 | grep PPS and
check the output. On chrony side you can enable the refclock log
(written every second, probably good idea to place it on tmpfs) and
see if chrony sees any SHM samples.

> # delay 0.0 is right, but use 0.2 to avoid NMEA
> # time fighting with PPS time
> refclock SHM 0 offset 0.0 delay 0.2
> refclock SHM 1 offset 0.0 delay 0.0
> refclock SHM 1 poll 4 offset 0.0 refid GPS1

Use only one refclock line per SHM segment.

> refclock SOCK /dev/gps

This should be /tmp/chrony.ttyS0.sock or /var/run/chrony.ttyS0.sock,
but probably not related to your problem.

-- 
Miroslav Lichvar

---
To unsubscribe email chrony-users-request@xxxxxxxxxxxxxxxxxxxx 
with "unsubscribe" in the subject.
For help email chrony-users-request@xxxxxxxxxxxxxxxxxxxx 
with "help" in the subject.
Trouble?  Email listmaster@xxxxxxxxxxxxxxxxxxxx.


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/