Subject: Re: equivalent of sockstat?
To: Brian A. Seklecki <lavalamp@spiritual-machines.org>
From: Geert Hendrickx <ghen@hmacs.cmi.ua.ac.be>
List: netbsd-help
Date: 12/23/2004 18:03:23
On Thu, Dec 23, 2004 at 11:13:21AM -0500, Brian A. Seklecki wrote:
> 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.

Yeah FreeBSD removed perl from their base system in 5.x and rewrote all
perl stuff in C (or dropped them).  I scp'd the perl script from my 4.10
box, but NetBSD netstat(1) is indeed not 100% compatible.  

But their script basically gets its info from fstat(1) and netstat(1),
so it must be possible to write something similar for NetBSD (maybe in
/bin/sh since perl is not in the NetBSD base system either).  I'll look
into it.  

> Anyway, LSOF

-> Does not work for non-root users, so I think a sockstat-like shell
script, using fstat/netstat, is the way to go.  I'll try to work
something out and post it.  

GH

-- 
:wq