gpsd-dev
[Top][All Lists]
Advanced

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

Re: ✘gpsinfo


From: Gary E. Miller
Subject: Re: ✘gpsinfo
Date: Mon, 15 Mar 2021 16:17:26 -0700

Yo Chris!

On Mon, 15 Mar 2021 15:41:37 -0700
Chris Kuethe <chris.kuethe@gmail.com> wrote:

> On Mon, Mar 15, 2021 at 2:57 PM Gary E. Miller <gem@rellim.com> wrote:
> 
> > > Since you're already practicing `which`craft, you could see if
> > > lsof is available. It's not super uncommon.  
> >
> > And do what with "lsof"?
> >  
> 
> On my nearest linux machine, here's how I can check what something
> claiming to be `sshd` is listening on
> $ sudo lsof -c sshd | grep LISTEN

Not what I am looking for.  I'm not looking for something running called
"gpsd", I'm looking for something holding the gpsd port (2947), like
systemd(umpkopf).

> And here's how I could find what process is listening on TCP port 22.
> $ sudo lsof -iTCP:22 -s TCP:LISTEN
> COMMAND    PID USER   FD   TYPE    DEVICE SIZE/OFF NODE NAME
> sshd    110810 root    7u  IPv4 467632376      0t0  TCP *:ssh (LISTEN)
> sshd    110810 root    8u  IPv6 467632378      0t0  TCP *:ssh (LISTEN)

That looks nice. 

Now I have:

# use sockstat, lsof, netstat or ss, depending
if command -v sockstat; then
    sockstat | egrep 'gpsd|:2947 '
elif command -v lsof; then
    lsof -iTCP:2947 -s TCP:LISTEN
elif command -v netstat; then
    # FreeBSD does not support "-n"
    netstat -lp | egrep "gpsd|:2947"
elif command -v ss; then
    ss -lpn | egrep 'gpsd|:2947 '
fi

Pushed to git head, and attached.

> Yep, launchd is doing that systemd thing.

launchd inspired sysstemd, but them systemd(umber) got cancer.

OTOH, my recent osX upgrade bricked my mac mini...

RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
        gem@rellim.com  Tel:+1 541 382 8588

            Veritas liberabit vos. -- Quid est veritas?
    "If you can't measure it, you can't improve it." - Lord Kelvin

Attachment: gpsdebuginfo
Description: Binary data

Attachment: pgpZ53R7msUMS.pgp
Description: OpenPGP digital signature


reply via email to

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