This isn't pretty but it works for Windows based systems using built in OS 
tools...

1) Go to a DOS Prompt
2) Run netstat -noa
3) Look at the list showing the port you want and then grab the PID from that 
list
4) Run Tasklist | findstr PID from above
That should provide you the process name using the port.

Here are some more details and options to illustrate:
C:\>netstat -noa
Active Connections
  Proto  Local Address          Foreign Address        State           PID
  TCP    0.0.0.0:80             0.0.0.0:0              LISTENING       4

       NOTE - if you are only looking for a certain port you can pipe this 
output to findstr as below:
                netstat -noa | findstr portnumberyouwant

         EXAMPLE: to find something listening on port 80 do this:

C:\>netstat -noa | findstr :80
  TCP    0.0.0.0:80             0.0.0.0:0              LISTENING       4
  TCP    192.168.14.205:59731   206.190.52.34:80       ESTABLISHED     2648
  TCP    [::]:80                [::]:0                 LISTENING       4

Next I see that I want to know what the process(executable) is with PID 2648 so 
I do this:

C:\>tasklist | findstr 2648
iexplore.exe                  2648 Console                    1    191,136 K

Which tells me that the Process with PID 2648 is Internet Explorer and it is 
using port 80.


________________________________
From: "Hart, Robert" <robert.h...@genexservices.com>
To: NT System Admin Issues <ntsysadmin@lyris.sunbelt-software.com>
Sent: Thursday, April 9, 2009 1:36:48 PM
Subject: RE: Too to find what .exe has a port open


Try Free Extended Task Manager by Extensoft.  Then again it depends why you are 
asking this question.  I would not put this on a server I am almost positive it 
requires a install.  I have not tried just running the exe without installing.
 
http://www.extensoft.com/?p=free_task_manager
 
 
Bob
 
From:David Lum [mailto:david....@nwea.org] 
Sent: Thursday, April 09, 2009 2:09 PM
To: NT System Admin Issues
Subject: Too to find what .exe has a port open
 
I have tools that tell me WHAT port is open, but nothing to tell me what app 
has the port open. What do you guys use? (yes probably discussed here before…)
David Lum// SYSTEMS ENGINEER 
NORTHWEST EVALUATION ASSOCIATION
(Desk) 971.222.1025// (Cell) 503.267.9764


      
~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

Reply via email to