lsof | grep TCP
netstat --ip -a -p
Those particular options mean to show just IP ports (UDP/TCP), in all statuses (active, listening) and to display the local process which is involved.
lsof | grep TCP