Netstat view port usage

Netstat is a console command and a very useful tool for monitoring TCP/IP networks. It displays routing tables, actual network connections, and status information for each network interface device. Netstat is used to display statistics related to IP, TCP, UDP, and ICMP protocols. It is generally used to check the network connection of each port of the machine.

If your computer sometimes receives packets that cause erroneous data or failures, you don't have to wonder if TCP/IP can tolerate these types of errors and automatically resend packets. But if the cumulative number of error conditions is a significant percentage of the received IP datagram, or if its number is increasing rapidly, then you should use Netstat to find out why this is happening.

Netstat -an is generally used to display all connected ports and is represented by numbers. The netstat command in the Windows system knows how to view the port and process, so what should be done under the netstat command! Let's take a look now!

Objective: In the Windows environment, use the netstat command to check whether a port number is occupied and which process is occupied.

Operation: The operation is divided into two steps: (1) to see that the port is occupied by the PID;

Method 1: Target the view port, use the command

Netstat –ano|findstr “Port Number”, as shown in the figure, the last column is PID. The port number in the figure is 1068, and the corresponding PID is 3840.

Netstat view port usage

(a) diagram

Method 2: View all, then find the corresponding port and PID.

Netstat view port usage

(b) Figure

The five columns in the first picture are the five columns corresponding to the above (a) figure.

(2) View the process name corresponding to the PID.

Method 1: Always use the command to find, tasklist|findstr ""

Netstat view port usage

(c) map

As can be seen from (c), the name of the process corresponding to PID 3840 is msnmsgr.exe.

Method 2: View with Task Manager.

Bring up the task manager and select the column, such as the d image.

Netstat view port usage

(d) map

View the process name corresponding to the PID. As in msnsgr.exe in (e)

Netstat view port usage

(e) map

Appendix: Enter netstat /? on the command line You can view information about netstat.

C:Documents and SettingsAdministrator"netstat /?

Displays protocol statistics and current TCP/IP network connections.

NETSTAT [-a] [-b] [-e] [-n] [-o] [-p proto] [-r] [-s] [-t] [-v] [interval]

-a Displays all connection and listening ports.

-b display is included in the creation of each connection or listening port

Executable component. Executable components are known in some cases

Have multiple independent components, and in these cases

The sequence of components included in creating a connection or listening port

be shown. In this case, the executable component name

In the bottom [], the top is the component it calls.

Wait until the TCP/IP section. Note this option

May take a long time if there is not enough permission

May fail.

-e Displays Ethernet statistics. This option can be combined with -s

The options are used in combination.

-n Displays the address and port number in numeric form.

-o Displays the process ID 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 can be one of the following protocols:

IP, IPv6, ICMP, ICMPv6, TCP, TCPv6, UDP, or UDPv6.

-r Displays the routing table.

-s Displays statistics by protocol. By default, IP is displayed,

Statistics for IPv6, ICMP, ICMPv6, TCP, TCPv6, UDP, and UDPv6;

The -p option is used to specify a subset of the defaults.

-t Displays the current connection uninstall status.

-v is included with the -b option when it is included

Create a connection or listen port for all executable components

Component.

Interval redisplay selected statistics, between each display

Pause interval in seconds. Press CTRL+C to stop re

Display statistics. If omitted, netstat shows the current

Configuration information (displayed only once)

12 Inch Coaxial Speaker

12 Coaxial Speaker,Coaxial Speaker 12 Inch,12 Inch Coaxial Speaker,Pro Audio Coaxial Speakers

Guangzhou Yuehang Audio Technology Co., Ltd , https://www.yhspeakers.com