[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gpsinfo
From: |
Hal Murray |
Subject: |
Re: gpsinfo |
Date: |
Mon, 15 Mar 2021 15:54:51 -0700 |
> FreeBSD has sockstat by default. Can that tell me if 2947 is listeneing, and
> what program/pid has it?
Looks like it.
sockstat | grep tcp
murray sshd 80460 3 tcp4 192.168.1.23:22 192.168.1.2:48594
root sshd 80457 3 tcp4 192.168.1.23:22 192.168.1.2:48594
ntpd ntpd 67212 6 tcp4 *:4460 *:*
ntpd ntpd 67212 7 tcp6 *:4460 *:*
root sshd 755 3 tcp6 *:22 *:*
root sshd 755 4 tcp4 *:22 *:*
root sendmail 723 4 tcp4 127.0.0.1:25 *:*
Header (that grep drops):
USER COMMAND PID FD PROTO LOCAL ADDRESS FOREIGN ADDRESS
There is no gpsd on that system so the lack of 2947 is expected. I assume the
4460 is a good example.
-------------
> You are a few revs behind. Git head now does this:
> netstat -lp | egrep "gpsd|:2947"
> The "-p" is supposed to print the pid of the process holding the socket.
On FreeBSD, -p is for protocol.
>From the man page:
-f address_family, -p protocol
Limit display to those records of the specified address_family or a
single protocol. The following address families and protocols are
recognized:
Family Protocols
inet (AF_INET) divert, icmp, igmp, ip, ipsec,
pim, sctp, tcp, udp
inet6 (AF_INET6) icmp6, ip6, ipsec6, rip6,
sctp, tcp, udp
pfkey (PF_KEY) pfkey
netgraph, ng (AF_NETGRAPH) ctrl, data
unix (AF_UNIX)
link (AF_LINK)
The program will complain if protocol is unknown or if there is no
statistics routine for it.
--
These are my opinions. I hate spam.
- Re:gpsinfo, Hal Murray, 2021/03/15
- Re: gpsinfo, Gary E. Miller, 2021/03/15
- Re: gpsinfo, Gary E. Miller, 2021/03/15
- Re: gpsinfo,
Hal Murray <=
- Re: gpsinfo, Gary E. Miller, 2021/03/15
- Re: gpsinfo, Hal Murray, 2021/03/15
- Re: gpsinfo, Gary E. Miller, 2021/03/15
- Re: gpsinfo, Hal Murray, 2021/03/16
- Re: gpsinfo, Gary E. Miller, 2021/03/16
- Re: gpsinfo, Hal Murray, 2021/03/16
- Re: gpsinfo, Gary E. Miller, 2021/03/16
- Re: gpsinfo, Hal Murray, 2021/03/16
- Re: gpsinfo, Gary E. Miller, 2021/03/16
- Re: gpsinfo, Hal Murray, 2021/03/16