Re: Chrony not taking SOCKET data from Application

sarveshwar k <[email protected]>
Newsgroups gmane.comp.time.chrony.user
Message-ID <CAAik_WxYOR5tpihsgD16zPRaAMRGjs7JEyk6k0USxx6wvNFPBA@mail.gmail.com>
Hi Miroslav Lichvar,

I see the reference time of GPS is taken by Chronyd, but not synchronizing
the system clock.
Can you please suggest if any configuration changes required?

PFA of the output of chronyc tracking and the chrony config file.

Thanks & Regards
Sarveshwar.K
[image: tracking.JPG]

On Tue, Jan 24, 2023 at 2:05 PM sarveshwar k <[email protected]>
wrote:

> Hi Miroslav Lichvar,
>
> I have set poll 0 for refclock SOCK. When I checked the date command I
> still didnt see the GPS time taken.
>
> As GPS time is today date which I am sending to chronyd, I see chronyd is
> not syncing to that time. I still see system time is not the date and time
> that I have sent through SOCK.
>
> Should I have to change configuration to achieve this? Does
> refclock_sock.c file APIs wont get called to read the sample from GPS, as I
> used the structure defined in this file.
>
> Thanks & Regards
> Sarveshwar.K
>
> On Tue, Jan 24, 2023 at 1:21 PM Miroslav Lichvar <[email protected]>
> wrote:
>
>> On Tue, Jan 24, 2023 at 11:45:46AM +0530, sarveshwar k wrote:
>> > Hi Miroslav Lichvar,
>> >
>> > I have used a different socket to send the GPS time to chrony. But I see
>> > GPS status in chronyc as #?. And I didnt see the GPS time taken into
>> > consideration by chronyd. And I didnt see in the log that it received
>> > samples from SOCK refclock.
>>
>> '?' for the SOCK refclock is expected with the noselect option. You
>> can set poll to 0 to see the reachability register filled more quickly
>> after start.
>>
>> The log shows PPS samples accumulated, which means both the PPS and
>> the locked SOCK refclock are working.
>>
>> --
>> Miroslav Lichvar
>>
>>
>> --
>> To unsubscribe email chrony-users-request-kWFZVVI9zxvPqho9SqqRMmD2FQJk+8+b@public.gmane.org
>> with "unsubscribe" in the subject.
>> For help email chrony-users-request-kWFZVVI9zxvPqho9SqqRMmD2FQJk+8+b@public.gmane.org
>> with "help" in the subject.
>> Trouble?  Email [email protected]
>>
>>
tracking.JPG (image/jpeg, 46.2 KB) - not displayed
chrony.conf (application/octet-stream, 1.5 KB)
# Use public NTP servers from the pool.ntp.org project.
# Please consider joining the pool project if possible by running your own
# server(s).
# If you are a vendor distributing a product using chrony, you *MUST*
# read and comply with http://www.pool.ntp.org/vendors.html
#pool 0.openembedded.pool.ntp.org iburst

# Use a local timeserver in preference to the pool, if it's reachable.
#server 192.168.22.22 iburst minpoll 2 prefer

# Sync to pulse-per-second from an onboard GPS.
#refclock PPS /dev/pps1 poll 0 prefer
# You'll want to enable CONFIG_PPS and CONFIG_PPS_CLIENT_GPIO in your kernel,
# and an entry something like this in your device tree:
#	pps {
#		compatible = "pps-gpio";
#		gpios = <&ps7_gpio_0 56 0>;
#	};

# In first three updates step the system clock instead of slew
# if the adjustment is larger than 1 second.
makestep 1.0 3

# Record the rate at which the system clock gains/loses time,
# improving accuracy after reboot
driftfile /var/lib/chrony/drift

# Enable kernel synchronization of the hardware real-time clock (RTC).
#rtcsync

# Allow NTP client access from local network.
#allow 192.168/16

# Serve time even if not synchronized to any NTP server.
#local stratum 10
local stratum 1

# Specify file containing keys for NTP authentication.
#keyfile /etc/chrony.keys

# Specify directory for log files.
logdir /var/log/chrony

# Select which information is logged.
log measurements statistics tracking refclocks
logdir /var/run/chrony

refclock PPS /dev/pps1 poll 0 lock GPS trust
refclock SOCK /var/run/chrony/udssocket.sock poll 0 refid GPS
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.