What ports are in use
netstat -an -ptcp
What process is running at a port (6000 in this example)
lsof -n -i4TCP:6000