The netstat command is used to display various network-related information. The netstat command can display network connections, routing tables and network interface information, allowing users to know which network connections are running. The syntax is "netstat [-a][-e][-n][-o][-p Protocol] [-r][-s][Interval][1]"; if used without parameters, netstat displays active TCP connections.
The operating environment of this tutorial: Windows 7 system, Dell G3 computer.
The netstat command is used to display various network-related information.
The function of the netstat command is to display network connections, routing tables and network interface information, allowing users to know which network connections are running. If used without parameters, netstat displays active TCP connections.
Format of netstat command
The general format of this command is:
netstat [-a][-e][-n][-o][-p Protocol][-r][-s][Interval][1]
Column header:
Name The name of the interface
Mtu The maximum transmission unit of the interface
Net/Dest The interface is located Network
Address IP address of the interface
Ipkts Number of packets received
Ierrs Number of packets received corrupted
Opkts Number of packets sent
Oeers Number of packets sent corrupted
Collisions The number of network conflicts recorded by this interface
How the netstat command works
From Overall, the output results of netstat can be divided into two parts: one is Active Internet connections, called active TCP connections, where "Recv-Q" and "Send-Q" refer to are the receive queue and the send queue. These numbers should generally be 0. If not it means packages are piling up in the queue. This situation can only be seen in very rare cases.
The other is Active UNIX domain sockets, called active Unix domain sockets (the same as network sockets, but can only be used for local communication, and the performance can be doubled).
Recommended related articles: linux tutorial
The above is the detailed content of What does the netstat command do?. For more information, please follow other related articles on the PHP Chinese website!