NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: How to find which process is listeing on a given port?



On Jul 21, 2012, at 1:24 AM, Paul Goyette wrote:

> I vaguely recall that there was a way to figure this out, but I can't for the 
> life of me remember!
> 
> I've got a _lot_ of traffic hitting my system on UDP 51413, and a netstat 
> shows that the machine is listening on this port for both UDP and TCP.  
> netstat -A gives me the pcb address for the active sessions (but, apparently, 
> not for the listener), but I can't remember how to figure out which process 
> has that pcb/file open.

I think fstat used to show the pcb address for sockets, but it doesn't seem to 
anymore... instead, it shows the actual socket endpoints, which is probably 
just as good for what you want. There's also sockstat.
-- 
Name: Dave Huang         |  Mammal, mammal / their names are called /
INet: khym%azeotrope.org@localhost |  they raise a paw / the bat, the cat /
FurryMUCK: Dahan         |  dolphin and dog / koala bear and hog -- TMBG
Dahan: Hani G Y+C 36 Y++ L+++ W- C++ T++ A+ E+ S++ V++ F- Q+++ P+ B+ PA+ PL++



Home | Main Index | Thread Index | Old Index