OS X - List all active sockets
From netstat's manual page:


  The netstat command symbolically displays the contents of various network-related data structures.  There are a
       number of output formats, depending on the options for the information presented.  The first form of the command
       displays a list of active sockets for each protocol.


pse@Mithos:~$ netstat
Active Internet connections
Proto Recv-Q Send-Q  Local Address          Foreign Address        (state)    
tcp4       0      0  localhost.8228         localhost.52662        ESTABLISHED
tcp4       0      0  localhost.52662        localhost.8228         ESTABLISHED
tcp4       0      0  192.168.1.30.52661     stackoverflow.co.https ESTABLISHED
tcp4       0      0  localhost.8228         localhost.52656        ESTABLISHED
tcp4       0      0  localhost.52656        localhost.8228         ESTABLISHED
tcp4       0      0  localhost.8228         localhost.52651        ESTABLISHED
...