Knowing which PORT is using by which APPLICATION

April 20, 2009 07:49 by Ramana

Recently for a client need to install our SilverLight application on his laptop for demo over GotoMeeting. The laptop is having Vista 64 bit Windows OS. After installing IIS 7 on it, the webserver's Default Website was not starting. So checked everything - Services, Installed Apps in Programs & Features etc, to see whether Apache or Tomcat or any other webserver is running and blocking 80 port. But couldn't see any of those applications.

Then started hunting to know who is blocking 80 port on that machine. Did little googling and found following 2 commands to know which app is listening to the 80 port.

Through these commands you can know easily which application is listening to a particular port. As well you can see all ports that are exposed and applications that are using them. This is a 2 step process. First we will see ,what are the ports that are listening by different Process Ids. Next using that PID we will get the Application name.

To know the listening ports on your machine type the following command in CMD prompt

netstat -ano | find /i "listening"

Fist column will show you the protocol TCP or UDP, next IP & PORT numbers of Source, next IP & PORT numbers of Destination machine, next State (that we needed to filter the list), and finally the Process Id (PID).

From the last column we will take the Process Id and find the Application of it.

So for that lets Google and download a small application named PUList. The Windows 2000 Resource Kit Tool needs you to go through Genuine OS check, and then you can download the PULIST.EXE. After downloading & installing PUList, navigate to the installed directory in CMD prompt. Run the following command in there,

pulist |find /I "6372"

or just

pulist 

will list all the processes that are running.

Finally we found that Skype is using the port 80. So after exiting it the IIS Default website started working.