Run the following command to check if port is in use
# netstat -an | grep <port number>
If above returns the connection, then run the following command to get the address of the port number
# netstat -Aan | grep <port number>
Once you have the address of the port number, run the following command to get the process id that is using the port.
# rmsock <address of port number> tcpcb
Example
# netstat -an | grep 30767 tcp4 0 0 *.30767 *.* LISTEN # netstat -Aan | grep 30767 f100060001b2f398 tcp4 0 0 *.30767 *.* LISTEN # rmsock f100060001b2f398 tcpcb The socket 0x1b2f008 is being held by proccess 942150 (vcs_agent).