Strace

# To start and monitor an new process:
strace -f -e trace=network -s 10000 PROCESS ARGUMENTS

# To monitor an existing process with a known PID:
strace -p $PID -f -e trace=network -s 10000


# show the connections an application is making including the port being used.
netstat -taucp | grep