Re: Chrony not taking SOCKET data from Application
sarveshwar k <[email protected]>
| Newsgroups | gmane.comp.time.chrony.user |
|---|---|
| Message-ID | <CAAik_WwY8nc6v9qOKNie9xrHGyViN3272M3if2Lnk82DFquPmA@mail.gmail.com> |
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. Can you please check if my configuration is correct and how to configure chrony to take GPS time. Please find the attachments of the config file and log taken. Thanks & Regards Sarveshwar.K On Mon, Jan 23, 2023 at 7:49 PM sarveshwar k <[email protected]> wrote: > Hi Miroslav Lichvar, > > Yes I used the default socket created when run the chronyd. I will use > another socket to be created by chronyd for getting time. > > Thanks & Regards > Sarveshwar.K > > On Mon, Jan 23, 2023 at 6:04 PM Miroslav Lichvar <[email protected]> > wrote: > >> On Mon, Jan 23, 2023 at 05:54:20PM +0530, sarveshwar k wrote: >> > But I see the data is not received at all. I expected read_sample() >> > function will be triggered when received on the socket. But I am seeing >> > error message from file cmdmon.c file mentioning "Read command packet >> > without the source address". I am using Unix Domain socket with >> SOCK_DGRAM >> > option. >> >> That suggests you are sending the message to the cmdmon socket >> (default /var/run/chrony/chronyd.sock) instead of the socket specified >> by refclock SOCK directive. >> >> -- >> 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] >> >>
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 noselect refid GPS
c3.log
(application/octet-stream, 277.5 KB) - not displayed