Subject: Re: equivalent of sockstat?
To: None <ghen@hmacs.cmi.ua.ac.be>
From: Brian A. Seklecki <lavalamp@spiritual-machines.org>
List: netbsd-help
Date: 12/23/2004 11:13:21
On Thu, 23 Dec 2004, Brian A. Seklecki wrote:
> On Mon, 2004-12-20 at 05:23, Geert Hendrickx wrote:
>> Hi,
>>
>> I'm moving from FreeBSD 4.x to NetBSD 2.0... But I'm not completely
>
> lsof(8) is in pkgsrc. sockstat can be pretty easily modified; it was a
Apparently it became a binary in 5.x Perl scipt still available via fbsd
cvsweb:
http://www.freebsd.org/cgi/cvsweb.cgi/src/usr.bin/sockstat/?only_with_tag=RELENG_4_9_0_RELEASE
IIRC, the portability limitation of sockstat related to netstat(1) flags
present in fbsd and not in nbsd/obsd.
Anyway, LSOF
~Brian
> perl(1) script, the last i checked in 4.x:
>
> also....
>
> # netstat -A inet -l -n
> Active Internet connections (only servers)
> Proto Recv-Q Send-Q Local Address Foreign Address
> State
> tcp 0 0 127.0.0.1:32768 0.0.0.0:*
> LISTEN
> tcp 0 0 0.0.0.0:111 0.0.0.0:*
> LISTEN
> tcp 0 0 0.0.0.0:6000 0.0.0.0:*
> LISTEN
> tcp 0 0 127.0.0.1:631 0.0.0.0:*
> LISTEN
> tcp 0 0 0.0.0.0:734 0.0.0.0:*
> LISTEN
> udp 0 0 0.0.0.0:68 0.0.0.0:*
> udp 0 0 0.0.0.0:728 0.0.0.0:*
> udp 0 0 0.0.0.0:731 0.0.0.0:*
> udp 0 0 0.0.0.0:111 0.0.0.0:*
> udp 0 0 0.0.0.0:631 0.0.0.0:*
> udp 0 0 127.0.0.1:123 0.0.0.0:*
> udp 0 0 0.0.0.0:123 0.0.0.0:*
>
>
>> comfortable yet. e.g. is there an equivalent of sockstat(1) in NetBSD?
>> On FreeBSD, sockstat -4l lists all listening IPv4 sockets (with process,
>> user), sockstat -6c lists all connected IPv6 sockets, sockstat -ul lists
>> all listening UNIX domain sockets, etc.
>>
>> On NetBSD, netstat(1) doesn't list the process nor the user, and
>> fstat(1) doesn't separate listening/connected sockets.
>>
>> GH
>
l8*
-lava
x.25 - minix - bitnet - plan9 - 110 bps - ASR 33 - base8