Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Find the owner of a socket? or Where is sockstat(1)

In other BSD unixes, sockstat(1) is the convenient way to find the PID of the owner of a socket. In OS X the man page for netstat(1) mentions it in the SEE ALSO section, but it doesn't appear to be a part of OS X.

If so, is there another convenient way to find the same information?

Late 2006 24" iMac, Mac OS X (10.6.3)

Posted on Sep 22, 2010 6:37 AM

Reply
Question marked as Best reply

Posted on Sep 22, 2010 6:46 AM

How about lsof?
7 replies

Sep 25, 2010 12:03 PM in response to thefsb

I was just about to post the same question but fortunately did a search on sockstat.

netstat -a shows open ports and connections ( http ) that lsof -i does not seem to list. I wanted bytes in and out per open port but do not see that option.

The netstat man page does list sockstat in the "SEE ALSO" section. At the very least, apple should do a better job maintaining its man pages.

I came to this question because my mini was doing a suspiciously large amount of network IO and I wanted to find out not only which ports were open but as much about them as possible, especially how much IO per port.



Avraam Jack Dectis

Find the owner of a socket? or Where is sockstat(1)

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.