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

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


On Sun, 6 Nov 2011, 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.

How is gpsd set up to deliver the time to shm?
Do you have any clues from what is in /var/log/messages, /var/log/chronyc?

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.

How do you do that? Is it set?

What does chronyc
sources
sourcestats

say?


Sometimes chrony will sync to gpsd, sometimes it won't. I can't find a pattern or anything useful to diagnose.

I'm sort of throwing things against a wall and seeing what sticks. SHM0 should work. At least it has in the past.

chronyc>  sources
210 Number of sources = 4
MS Name/IP address           Stratum Poll LastRx Last sample
============================================================================
# ? SHM0                          0    4    10y     +0ns[   +0ns] +/-    0ns
# ? SHM1                          0    4    10y     +0ns[   +0ns] +/-    0ns
# ? GPS1                          0    4    10y     +0ns[   +0ns] +/-    0ns
# ? SOC3                          0    4    10y     +0ns[   +0ns] +/-    0ns

Nov 6 18:12:13 anchor daemon.info chronyd[2728]: chronyd version 1.25-pre1 starting Nov 6 18:12:13 anchor daemon.info chronyd[2728]: Initial txc.tick=10000 txc.freq=0 (0.00000000) txc.offset=0 => hz=100 shift_hz=7 Nov 6 18:12:13 anchor daemon.info chronyd[2728]: set_config_hz=0 hz=100 shift_hz=7 basic_freq_scale=1.28000000 nominal_tick=10000 slew_delta_tick=833 max_tick_bias=1000 Nov 6 18:12:13 anchor daemon.info chronyd[2728]: Linux kernel major=2 minor=6 patch=32 Nov 6 18:12:13 anchor daemon.info chronyd[2728]: calculated_freq_scale=1.00000000 freq_scale=1.00000000

root@anchor:~# cat /etc/chrony/chrony.conf
# Chrony configuration

# Note: time servers and ntp client access is configured in /etc/config/ntpd
# and automatically set at startup

# Log clock errors above 0.5 seconds
logchange 0.5

# Allow command access only from localhost
cmdallow localhost
cmddeny

#  Password config for chronyc
#  Note: Using a command key other than "1" will break
#  /etc/init.d/ntpd and /etc/hotplug.d/iface/20-ntpd
keyfile /etc/chrony/chrony.keys
commandkey 1

#  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

refclock SOCK /dev/gps

allow 0/0



--
William G. Unruh   |  Canadian Institute for|     Tel: +1(604)822-3273
Physics&Astronomy  |     Advanced Research  |     Fax: +1(604)822-5324
UBC, Vancouver,BC  |   Program in Cosmology |     unruh@xxxxxxxxxxxxxx
Canada V6T 1Z1     |      and Gravity       |  www.theory.physics.ubc.ca/

---
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/