command to inentify the process that is listening in a port.

Jeffrey Goldberg jeffrey at
Tue Apr 10 16:15:29 UTC 2007

On Apr 10, 2007, at 3:00 AM, Jonathan McKeown wrote:

> On Monday 09 April 2007 17:37, Martin Hudec wrote:
>> Siju George wrote:
>>> How Do you actually Identify what process is listening on a TCP/ 
>>> IP port?

>> man lsof

> Just out of interest, why do so many people recommend lsof, which  
> is a port,
> when sockstat/fstat are in the base system and seem to cover the  
> same ground?
> Am I missing something about lsof?

A few weeks ago, I would have recommended lsof simply because I  
wasn't aware of sockstat.   It's only from reading things on this  
list that I've learned about sockstat.  And thanks to your message,  
I've now learned about fstat.

Since learning about sockstat, I haven't used lsof, even though lsof  
was one of the first things I installed from ports when I set up my  

I don't know if others have different reasons for recommending lsof,  
but speaking for myself, I simply wouldn't have known better.



Jeffrey Goldberg              

More information about the freebsd-questions mailing list