View the use of Windows ports (copied)

Source: Internet
Author: User
When Tomcat is used, the default port 8080 is often occupied. Program This vulnerability is being occupied. You can find a software on the website or use a firewall to check the port used. In fact, this is not necessary, in Windows, there is a DOS command to view the current port usage. This command is netstat, which has many parameters available and can be viewed through the-HELP parameter, for example: to view all the connection and listening ports, you can add the-a parameter to display the process ID of each connection. You can add the-O parameter. After the process ID is found, you can find the PID process in the Process Manager of windows. By default, the Process Manager of Windows does not display the PID, you can choose [view]> [Select column] to view the PID. Then, the process viewer displays all the parameters and descriptions of the PID netstat as follows:
Displays the Protocol statistics and the current TCP/IP network connection. Netstat [-A] [-B] [-E] [-N] [-O] [-P proto] [-R] [-S] [-V] [Interval ]-A displays all connection and listening ports.
-B: displays the information contained in creating each connection or listening port.
Executable components. Executable components are known in some cases
Has multiple independent components, and in these cases
Component sequence included in creating a connection or listening port
Displayed. In this case, the executable component name
In [] at the bottom, the top is the component it calls,
Wait until the TCP/IP part. Note this option
It may take a long time. If you do not have sufficient permissions
May fail.
-E displays Ethernet statistics. This option can be used with-S
Option combination.
-N: the address and port number are displayed in numbers.
-O displays the ID of the process associated with each connection.
-P proto shows the connection of the Protocol specified by proto; proto can be
One of the following protocols: TCP, UDP, tcpv6, or udpv6.
If used together with the-s option to display statistics by Protocol, proto can be the following protocol
One:
IP, IPv6, ICMP, ICMPv6, TCP, tcpv6, UDP, or udpv6.
-R shows the route table.
-S displays statistics by protocol. By default, the IP address,
Statistics of IPv6, ICMP, ICMPv6, TCP, tcpv6, UDP, and udpv6;
The-P option is used to specify the default subset.
-V and-B options will be included in
Create a connection or listener port for All executable Components
Component.
Interval re-displays the selected statistics.
Pause interval (in seconds ). Press Ctrl + C to stop and restart
Displays statistics. If omitted, netstat displays the current
Configuration Information (only once)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.