[rescue] Finding out owner of the socket port

Greg A. Woods rescue at sunhelp.org
Fri Sep 21 11:30:14 CDT 2001


[ On Friday, September 21, 2001 at 11:18:43 (-0400), s at avoidant.org wrote: ]
> Subject: Re: [rescue] Finding out owner of the socket port
>
> And what exactly would then be wrong with 
> 
> # pkg-get install lsof
>
> using Solaris and happy about it

On *BSD it would be:

	# pkg_add lsof

but of course on *BSD the standard 'fstat' command already provides all
the information you could ever need about any open socket....

(On FreeBSD it's not quite as nice as NetBSD yet because you have to use
'netstat -A' to find the control address, and then 'fstat' to find the
process ID; but on the latest NetBSD now you just use 'fstat' alone as
it now shows almost all the details, leaving you only the hostname and
portname lookups to do.)

# fstat | fgrep :25    
postfix  smtpd       5280    4* internet stream tcp c0dbb5ac *:25
root     master     17377    9* internet stream tcp c0dbb5ac *:25

-- 
							Greg A. Woods

+1 416 218-0098      VE3TCP      <gwoods at acm.org>     <woods at robohack.ca>
Planix, Inc. <woods at planix.com>;   Secrets of the Weird <woods at weird.com>



More information about the rescue mailing list