gpsd-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: New SHM


From: Miroslav Lichvar
Subject: Re: New SHM
Date: Mon, 23 Jan 2023 10:19:49 +0100

On Fri, Jan 20, 2023 at 12:43:52PM -0800, Gary E. Miller wrote:
> The chrony socket protocol has been doing everything we need here, and
> more. It is well established, debugged and documented.
...
> It supports single writer multiple reader.

I think with a Unix domain socket there can be only one reader, at
least I have no idea how a tool like ntpshmmon could get the messages
once the connection between the client and server is made.

To intercept the messages I suspect it would need to be a special
setup with some process duplicating the messages to two different
sockets like this:

socat -u UNIX-RECV:/run/chrony.ttyS0.sock - | \
  tee >(socat -u - UNIX-SENDTO:/run/chrony.ttyS0.sock1) |
  socat -u - UNIX-SENDTO:/run/chrony.ttyS0.sock2

gpsd would write to ".sock" as expected, but chronyd/ntpd would need
to be configured to use ".sock1" and the monitoring application would
read from ".sock2". That's pretty bad when compared ntpshmmon, which
you can start at any time and immediately see what is going on, but I
guess that's the price for the security and other advantages over SHM.
If chronyd/ntpd had good debug messages for receiving SOCK messages,
maybe it wouldn't be missed so much.

-- 
Miroslav Lichvar




reply via email to

[Prev in Thread] Current Thread [Next in Thread]