How to check port usage in windows

Option One,

 

Start--run--cmd Enter the command prompt and enter netstat -ano to see the PID of all connections. After that, find the program corresponding to this PID in the task manager. If there is no PID in the task manager, you can find it in the task manager Select "View" - "Select Column" in the manager. 

        Often, when we start the application, we find that the port required by the system is occupied by other programs. How to know who occupies the port we need is a headache for many people. This is a very simple method, I hope it will be useful to everyone. 

If we need to determine who occupies our 9050 port 

1. The Windows platform 
is executed under the Windows command line window: 
1. View all port occupancy

C:\>netstat -ano

  Protocol Local Address External Address Status PID

  TCP    127.0.0.1:1434         0.0.0.0:0              LISTENING       3236
  TCP    127.0.0.1:5679         0.0.0.0:0              LISTENING       4168
  TCP    127.0.0.1:7438         0.0.0.0:0              LISTENING       4168
  TCP    127.0.0.1:8015         0.0.0.0:0              LISTENING       1456
  TCP    192.168.3.230:139      0.0.0.0:0              LISTENING       4
  TCP    192.168.3.230:1957     220.181.31.225:443     ESTABLISHED     3068
  TCP    192.168.3.230:2020     183.62.96.189:1522     ESTABLISHED     1456
  TCP    192.168.3.230:2927     117.79.91.18:80        ESTABLISHED     4732
  TCP    192.168.3.230:2929     117.79.91.18:80        ESTABLISHED     4732
  TCP    192.168.3.230:2930     117.79.91.18:80        ESTABLISHED     4732
  TCP    192.168.3.230:2931     117.79.91.18:80        ESTABLISHED     4732

 

2. Check the occupancy of the specified port
C:\> netstat -aon|findstr "9050"

  Protocol Local Address External Address Status PID

  TCP    127.0.0.1:9050         0.0.0.0:0              LISTENING       2016

P: Did you see that the port is occupied by the process with the process ID of 2016, continue to execute the following command: (You can also go to the task manager to view the process corresponding to the pid)

3. View the process corresponding to the PID
C:\> tasklist|findstr "2016"

 Image Name PID Session Name Session# Memory Usage
 ========================================= ========
  tor.exe 2016 Console 0 16,064 K 

P: Clearly, tor is taking your port.

 

4. End the process

C:\>taskkill /f /t /im tor.exe

 

 

其他不懂的用 help吧~

 

 方案二、

      用TCP View吧 看到很清楚,软件见附件

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326460683&siteId=291194637