Sidebar

How can I best use netstat to identify ports being used?

0 votes
5.3K views
asked Jun 10, 2014 by mike-r-7535 (13,520 points)
Sometimes I just want to know what ports are available.  Other times I want to know what is using the port that QIE used to use.  How can I see the ports in use, and tie them to a particular process?

1 Answer

0 votes

Open a Command Prompt as Administrator and run the following command:

netstat -abno

This shows the bound port numbers as well as established connections.  In addition, this identifies the process id associated with each row.  If the list is long, sometimes I direct the output to a file so I can search for the port or process ID I'm interested in:

netstat -abno > c:\netstat.txt

To use the -o option, it must be run as Administrator.

I then like to use the Resource Monitor to identify which process ID. (Within Resource Monitor I can look at the file handles for the process which give a pretty good clue of the application.)

answered Jun 10, 2014 by mike-r-7535 (13,520 points)
...