Finding out what application is running on a specific port in Windows XP is easy by using two command line utilities. By using netstat with the proper switches you can list out all of the ports that are being used and then use Tasklist to list all of the applications that are running. The combination of the two utilities will allow you to figure out which application us using which port. As an example you can use the below directions to figure out what application is using port 80 for instance.
- Open Command Prompt: Click Start in the lower left hand corner of your PC and then select Run from the pop up. Type command in the Run window and click Enter to open up the command prompt.
- List Ports: Now use the below netstat command to list all of the applications using port 80 for instance. I have cygwin installed which also allows me to use grep. If you do not have this installed simply remove the | grep after the netstat command.
netstat -ano | grep 80
C:\>netstat -aon | grep 80
TCP 0.0.0.0:80 0.0.0.0:0 LISTENING 3000
TCP 192.168.1.98:1145 184.108.40.206:80 CLOSE_WAIT 2976
TCP 192.168.1.98:1180 220.127.116.11:1863 ESTABLISHED 3260As you can see the local computer is listening to port 80 on every available IP. The last number indicates the PID of the application running on port 80. So you will need to remember that for the next command.
- List Running Applications: Now use Tasklist as shown below to list the running applications and their coresponding PID (Process ID). We will be locating whatever application is running using PID 3000.
Tasklist | grep 3000
C:\>Tasklist | grep 3000
Skype.exe 3000 Console 0 9,960 KAs you can see the application using PID 3000 and running on port 80 is Skype.