[chrony-users] Synchronize system clock to GPS time |
[ Thread Index |
Date Index
| More chrony.tuxfamily.org/chrony-users Archives
]
- To: "chrony-users@xxxxxxxxxxxxxxxxxxxx" <chrony-users@xxxxxxxxxxxxxxxxxxxx>
- Subject: [chrony-users] Synchronize system clock to GPS time
- From: "Ryan Govostes (he/him)" <rgovostes@xxxxxxxx>
- Date: Thu, 3 Mar 2022 20:37:05 +0000
- Accept-language: en-US
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=whoi.edu; dmarc=pass action=none header.from=whoi.edu; dkim=pass header.d=whoi.edu; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=6JmgogJRPK691+1pJ9DBaMgaLU4aG+M7jhiLzn4D6+E=; b=MhaFBNaBrOx3Zcn/+eKrh9He0w1NHl/dyqc2WDIX50I5oNvAvENkyHada05Uq800dL9R4s/+CgHOIfLIr79Ll/wtkN1DlHHJ/lSluY5jvpp61cyJhcYkfew0xlCv8FdR2dqH4MwA+5jl1oDaTEN6fPPJxWm76xlqC5XP1ws494QeUMqcsNqj8ClW5U63dMK3Mv9+XiePO8cJCLKqzOgzt3pcs93n6zmrG0/FktW1wZdiKJ16+IQ1R6SL9gkMjB2TkdVLRyU1W6aWCkvkKgVljXdm0fzbs4g9DN2bf6IwpZgMvX0VbPmeR3zrTlQeTDcg6UcPBnvXp+tdlpJSGHVgxg==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cijsv5bIJgHwIkGMZw8nNm7yPXY0W/l+JeW8ZLbvXegvsefz1p2DqtUhD/ggY6bSi/9Qdc60TWKjy1M+S/oAmo9KCAnDf0BP3z5+7UxSEX7ix93S3jEBYBv4T0mHHV30SZ9qcUh9hu1xT3JrexpuHW/9ZS6xPV7RGlyDXY2Mjx3p+5quiHjJFKKx6jnb6f4iX/VGmHmJ8JcAxs3ZLnu8IcaT9add7N9Zl/2TFT5KHn73ZuQ60dMdri58cNMns6iRl3qe8jVDuimsCOOqIq4dZIDS0AQMXZObIe+2cxUg8OxaIUNLurewKjinLzwjMwOO+uxrdc0QH1hLx8aGQypMSw==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=whoi.edu;
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=whoi.onmicrosoft.com; s=selector2-whoi-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=6JmgogJRPK691+1pJ9DBaMgaLU4aG+M7jhiLzn4D6+E=; b=KL5Hh936bsnzXuIz8/qvWsJ/OBmreZ8IItQNwL5EZJleH4uWjxp0ixfUsf+PZLrNvSTUtyX8RqevNmUFWRenkCV0PL+iUn3GsuvZS0Bu9eFHxOYvk+Iy9/aVRbFpjSPO0/iE6l2nTr8hR+0H5KOeEbfUrfUWprNCr16cKJ+pvww=
- Thread-index: AQHYLz5xsfplHl6H4kG0hcZwNHoejg==
- Thread-topic: Synchronize system clock to GPS time
I have a GPS receiver with PPS connected to an embedded Linux system. GPSD feeds Chrony time updates from the GPS receiver over the Chrony socket.
The system clock is behind by a few months, and Chrony does not want to update the clock to the time reported by GPSD.
I have read the FAQ and a few threads on the same topic but the solutions presented don’t work for me. I have tried setting maxdistance to an absurdly high number, and allowing makestep 1 -1.
The “chronyc sources” command suggests that Chrony thinks that the GPS is in error. There is no console message that says that Chrony is attempting to adjust the clock.
Can I force Chrony to accept the time from the GPS?
Thanks,
Ryan
$ chronyc sources
210 Number of sources = 3
MS Name/IP address Stratum Poll Reach LastRx Last sample
===============================================================================
#x GPS 0 4 377 11 -2002h[ -2002h] +/- 100ms
#x PPS 0 4 377 10 -2002h[ -2002h] +/- 2919ns
^? asdf.xyz 0 9 0 - +0ns[ +0ns] +/- 0ns
$ chronyc tracking
Reference ID : 00000000 ()
Stratum : 0
Ref time (UTC) : Thu Jan 01 00:00:00 1970
System time : 0.000000041 seconds fast of NTP time
Last offset : +0.000000000 seconds
RMS offset : 0.000000000 seconds
Frequency : 404.716 ppm fast
Residual freq : +0.000 ppm
Skew : 0.000 ppm
Root delay : 1.000000000 seconds
Root dispersion : 1.000000000 seconds
Update interval : 0.0 seconds
Leap status : Not synchronised
$ cat /etc/chrony/chrony.conf
server asdf.xyz iburst prefer
# This directive specify the file into which chronyd will store the rate
# information
driftfile /var/lib/chrony/chrony.drift
# Log files location
logdir /var/log/chrony
# Stop bad estimates upsetting machine clock
#maxupdateskew 100.0
# This directive enables kernel synchronisation (every 11 minutes) of the
# real-time clock
rtcsync
# Step the system clock instead of slewing it if the adjustment is larger than
# one second, but only in the first three clock updates
makestep 1 -1
#
maxdistance 100000000
refclock SOCK /run/chrony.ttyCOM2.sock refid GPS precision 1e-1 offset 0.9999
refclock SOCK /run/chrony.ppsCOM2.sock refid PPS precision 1e-7