netstat

Command Function

The netstat command is a console command and is used for monitoring the TCP/IP network. It can display the actual network connections and the status of each network interface device. It is used to display the statistics related to the TCP and UDP protocols and check the network connection to each port on the device (board).

Syntax

netstat

Parameters

None

Usage

Run the command directly.

Example

Run netstat.

Figure 1 Output information

Output

Table 1 Output description

Parameter

Description

Proto

Protocol type.

Recv-Q

Amount of data that is not read by the user.

For Listen TCP, the value indicates the number of TCP connections that have finished three-way handshake but are not accepted by users.

Send-Q

For a TCP connection, this value indicates the amount of data that has been sent but not acknowledged.

For a UDP connection, this value indicates the amount of data buffered before IP address resolution is complete.

Local Address

Local IP address and port number.

Foreign Address

Remote IP address and port number.

State

TCP connection status. This parameter is meaningless for UDP.

NOTE: The command output like "========== total sockets 32 ====== unused sockets 22 BootTime 27 s ==========" indicates that there are 32 sockets in total, 22 sockets are not used, and it has been 27 seconds since the system starts.