How to see if a port is being consumed
Enter "Netstat-an" in the command prompt to display all open ports on this machine. The following table is a specific description.
Data columns |
Description |
Propo |
Refers to the protocol name used by the connection |
Local address |
is the local computer IP address and the port number that the connection is using |
Foreign address |
Refers to the IP address and port number of the remote computer that is connecting to this port |
State |
Indicates the TCP connection status if stat displays listening is occupied |
Eg: Find out if the specific "8080" port is occupied, what the program occupies
Enter Netstat-aon|findstr "8080" in the command prompt, and if there is a message indicating that a program is using the "8080" port, then no program occupies the port
Take this as an example: TCP 127.0.0.1:8080 0.0.0.0:0 LISTENING 20444
The above indicates that the port is occupied by a process number of 20444, and continues with the following command: The Tasklist|findstr "20444" console appears:
Java.exe 20444 Console 0 43,288 K
See, Java.exe takes up this 8080 port number.
Turn from "http://blog.csdn.net/bhn_candy/article/details/14453073"
See if the port is occupied under Windows and which program the port is taking up