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 08:29:53
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
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