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: $49.63 USD In Stock
    Used from: $6.21 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: $16.46 USD In Stock
    Used from: $0.64 USD In Stock

DeliciousStumbleUponDiggTwitterFacebookRedditLinkedInEmail
Tags: , , , , , , , , , ,
6 Responses to “Windows XP: Figure Out What Service is Running on a Specific Port”
  1. omniplex says:

    For the examples using grep, since this is windows specific, you can use “findstr” instead of having to install cygwin. “findstr” has been included with Windows XP and forward I believe.

    [Reply]

    alex Reply:

    Awesome! Thanks for the information. This is very useful to most people. ~!~ What about actually posting some articles my man! :) Hope all is well.

    [Reply]

  2. Chris says:

    That does not work for me. I get “netstat” is not recognized as an internal or external command. If I type “netstat -ano” in the run field from the start menu, I get the proper window for a microsecond.

    [Reply]

    alex Reply:

    Hello Chris,

    This means that netstat is not on your path or you are possibly trying to run the command from a user that does not have the permissions to do so. Try starting your command window using Start >> Run and typing “command” without the quotes. If that does not work try typing “cmd” into the Run box to launch the command Window. Make sure you are logged in as an administrator.

    If none of the above works then please let us know the version of Windows and copy/paste the command along with the error that is displayed.

    Thanks.
    Alex

    [Reply]

  3. ChannelSwimmer says:

    Hey,

    I used cygwin and the command fine

    [Reply]

    alex Reply:

    Hello ChannelSwimmer,

    Thanks for taking the ime to leave feedback.

    Thanks.
    alex

    [Reply]

  4.  
Leave a Reply

*Type the letter/number combination in the abvoe field before clicking submit.

*