Use netstat to See Internet Connections
on February 20, 2009
Using netstat, you can monitor programs that are making connections to remote hosts:
$ netstat -tpe
The -t flag limits the output to show only TCP connections. The -p flag displays the PID and name of the program making the connection. The -e flag displays extra information, such as the user name under which each program is running.