Saturday, November 21, 2009

How to find which process is using a port in Windows

The netstat command is used to display the TCP/IP network protocol statistics and information.

For help and to find all the options available with netstat command execute the below command.
c:/>netstat /?

To find all the open ports and which process is listening on those ports in Windows 2003 server follow the below steps.

Go to command prompt and type netstat -ano
It gives you the result of all active process running on the system along with the port to which they listen.

Then once you get the process id(PID) from the above step,
Go to Task Manager -> Processes tab.
Click View Menu -> Select Columns..
And select the check box of PID so that it gets displayed on the Processes tab.
Now using the PID got from the first step, get the process name which is listening on a particular port.

No comments: