View port usage in Windows

Source: Internet
Author: User

 

When using tomcat, we often encounter that the default port 8080 is occupied. Sometimes we want to check whether the program is occupying this port. You can find a software on the website, or use the firewall to view 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.
-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 you find the process ID, you can find the process corresponding to the PID in the Windows Process Manager. By default, the Windows Process Manager does not display the PID, you can select a type in [view]-> [select columns ].
View the PID, and then the process viewer will display 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
Display
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 displays the connection of the Protocol specified by proto; proto can be
One of the following protocols: TCP, UDP, tcpv6
Or udpv6.
If used with the-s option to display statistics by Protocol, proto
May be the following protocols
One:
IP, IPv6, ICMP, ICMPv6, TCP, tcpv6, UDP or
Udpv6.
-R shows the route table.
-S displays statistics by protocol. By default
IP,
IPv6, ICMP, ICMPv6, TCP, tcpv6, UDP, and udpv6
;
The-P option is used to specify the default subset.
-V and-B
When the options are used together
Create a connection or listener port for All executable Components
Component.
 
Interval re-displays the selected statistics.
Pause interval (in seconds ). Press Ctrl + c
Stop again
Displays statistics. If omitted, netstat displays the current

Configuration Information (only once) **************************************** * ** how does one view the port occupied by a process in windows?

Run netstat-ano at the command prompt
The corresponding PID number is displayed, and then you can view the corresponding PID Number Process in the task manager.

**************************************** * *** Netstat-noab: view the port Process

 

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.