Windows XP: Figure Out What Service is Running on a Specific Port

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.

  1. 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.
  2. 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
    

    Example Output:
    C:\>netstat -aon | grep 80
    TCP 0.0.0.0:80 0.0.0.0:0 LISTENING 3000
    TCP 192.168.1.98:1145 209.89.235.19:80 CLOSE_WAIT 2976
    TCP 192.168.1.98:1180 73.5.34.175: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.

  3. 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
    

    Example Output:
    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.


    List Price: $59.95 USD
    New From: $33.94 USD In Stock
    Used from: $0.98 USD In Stock

    Microsoft® Windows® XP Professional Resource Kit (Paperback)

    By (author): The Microsoft Windows Team, Charlie Russell, Charlie Russel, Sharon Crawford


    List Price: $59.99 USD
    New From: $80.00 USD In Stock
    Used from: $0.01 USD In Stock

Share