display tcp status [ [ task-id task-id ] [ socket-id socket-id ] | [ local-ip ipv4-address ] [ local-port local-port-number ] [ remote-ip ipv4-address ] [ remote-port remote-port-number ] ]
| Parameter | Description | Value |
|---|---|---|
task-id task-id |
Specifies the task ID. The status of the TCP connection with the specified task ID is displayed. |
The value is an integer, ranging from 1 to 200. |
socket-id socket-id |
Specifies the socket ID. The status of the TCP connection with the specified socket ID is displayed. |
The value is an integer, ranging from 1 to 14848. |
local-ip ipv4-address |
Specifies the IP address of the local device. The TCP connection status of the specified IP address is displayed. |
- |
local-port local-port-number |
Specifies the port number of the local device. The TCP connection status of the specified port number is displayed. |
The value ranges from 0 to 65535. |
remote-ip ipv4-address |
Specifies the IP address of the remote device. The TCP connection status of the specified IP address is displayed. |
- |
remote-port remote-port-number |
Specifies the port number of the remote device. The TCP connection status of the specified port number is displayed. |
The value ranges from 0 to 65535. |
You can set the filtering rules, such as task ID, socket ID, and socket type in the display tcp status command to view only information matching the rules. This reduces the number of the output information and improves the usability of the output information and the accuracy and efficiency of fault location.
# Display the TCP connection status on the local host.
<sysname> display tcp status TCPCB Tid/Soid Local Add:port Foreign Add:port VPNID State 0a5d560c 30 /1 0.0.0.0:23 0.0.0.0:0 14849 Listening
# Display the TCP connection originated from the local IP address 0.0.0.0 and port 23.
<sysname> display tcp status local-ip 0.0.0.0 local-port 23 TCPCB Tid/Soid Local Add:port Foreign Add:port VPNID State 0a5d560c 30 /1 0.0.0.0:23 0.0.0.0:0 14849 Listening
# Display the TCP connection originated from the local IP address 0.0.0.0 and port 24.
<sysname> display tcp status local-ip 0.0.0.0 local-port 24 TCPCB Tid/Soid Local Add:port Foreign Add:port VPNID State
Item |
Description |
|---|---|
TCPCB |
TCP task control block number. |
Tid/Soid |
Task ID and socket ID. |
Local Add:port |
Local IP address of TCP connection and local port number. |
Foreign Add:port |
Remote IP address of TCP connection and remote port number. |
VPNID |
VPN ID. |
State |
Status of TCP connection:
|