PROTCOLS WITH NETSTAT
Use the command:
% netstat -an
It will show you what ports
are in use on the local and
foreign machines as well as
the protocol running over that
port for that connection and
IP address information. It
also displays the state of
the socket being used.
Using the above tip user can
identify the port to which he
wants to send data is busy
or free.