[nycbug-talk] process/command listening to a socket

Andy Kosela akosela at andykosela.com
Tue Apr 12 15:11:47 EDT 2011

On Tue, Apr 12, 2011 at 7:12 PM, Jesse Callaway <bonsaime at gmail.com> wrote:
> I've been linuxized for a while by the demands of... well everyone
> runs Centos : (
> Anwyay, I'm not sure how to do some things in BSD anymore. In
> particular, I forget how to show the processes which have listening
> sockets. With gnu netstat I do this to show programs with listening
> tcp's -
> netstat -ntlp
> It's understood that -p is certainly not going to behave the same in
> both environments. Would lsof be a better approach in BSD?

# netstat -anfinet


# sockstat -4l

would serve you good in BSD environment.  Generally I find BSD
netstat(1) less cluttered than GNU one.


More information about the talk mailing list