[ Thread Index |
Date Index
| More chrony.tuxfamily.org/chrony-users Archives
]
You can determine
whether your GPS emits this pulse by running at -D 5 and watching for
carrier-detect state change messages in the logfile
....
To make
use of this feature, gpsd must be started as root so it can activate
the timestamping and line discipline; after attempting to set up PPS,
it will relinquish root privileges.
On Sun, 6 Nov 2011, Yan Seiner wrote:
> Bill Unruh wrote:
>> 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?
> Not sure. I thought it was automatic? Is there a gpsd-side configuration I
> should be using? The docs indicate that no special config is needed.
>
>> Do you have any clues from what is in /var/log/messages,
>> /var/log/chronyc?
> Nothing that seems to indicate a problem. Any debug settings I can use to
> collect useful messages?
>
>> >
>> > 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?
> date -s 2010.01.01-01:01
>
> /etc/init.d/gpsd start
> #now wait for a lock
> echo "Waiting for GPS lock"
> sleep 10
> echo '?WATCH={"enable":true,"json":true}' | netcat localhost 2947 | awk
> '/"mode":3/{exit}'
> echo "Got GPS lock - setting date"
>
> date -s \
> $( \
> echo '?WATCH={"enable":true,"json":false,"nmea":true}' \
> | netcat localhost 2947 \
> | awk '/GPRMC/{FS=","; print 20 substr($10,5,2) "." substr ($10,3,2)
> "." substr($10,0,2) "-" substr($2,0,2) ":" substr($2,3,2) ":" substr($
> 2,5,2); exit}' \
> )
>
> /etc/init.d/ntpd start
>
>
>>
>> What does chronyc
>> sources
> root@anchor:/tmp# chronyc sources
> 210 Number of sources = 8
> 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
> ^ + bindcat.fhsu.edu 2 6 51 -12ms[ -12ms] +/- 99ms
> ^ + mail.freerip.com 3 6 52 -17ms[ -23ms] +/- 117ms
> ^ ? 2607.f0d0.2001.00de.0000. 0 10 10y +0ns[ +0ns] +/- 0ns
> ^ * 199.4.29.166 2 6 51 -12ms[ -18ms] +/- 97ms
>
>
>>
>> sourcestats
> root@anchor:/tmp# chronyc sourcestats
> 210 Number of sources = 8
> Name/IP Address NP NR Span Frequency Freq Skew Offset Std
> Dev
> ==============================================================================
> SHM0 0 0 0 0.000 2000.000 +0ns
> 4000ms
> SHM1 0 0 0 0.000 2000.000 +0ns
> 4000ms
> GPS1 0 0 0 0.000 2000.000 +0ns
> 4000ms
> SOC3 0 0 0 0.000 2000.000 +0ns
> 4000ms
> bindcat.fhsu.edu 4 4 195 -108.126 958.270 +460us
> 4771us
> mail.freerip.com 8 3 453 -9.475 98.482 +6260us
> 7290us
> 2607.f0d0.2001.00de.0000. 0 0 0 0.000 2000.000 +0ns
> 4000ms
> 199.4.29.166 4 4 194 -100.837 631.995 -1050us
> 3179us
>
>
>
>
--
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.