The display ip socket command displays information about the created IPv4 socket. If no parameter of the command is specified, all types of sockets are displayed.
display ip socket [ monitor ] [ task-id task-id socket-id socket-id | sock-type socket-type ]
| Parameter | Description | Value |
|---|---|---|
| monitor | Displays information about the Socket Monitor. That is, information about the Socket Monitor needs to be displayed together with information about the Socket. | - |
| task-id task-id | Specifies the ID of the task to be displayed. | The task ID must already exist. |
| socket-id socket-id | Specifies ID of the socket to be displayed. | The socket ID must already exist. |
| sock-type socket-type | Specifies the Socket type. That is, information about the specified type of Socket is displayed. | The value is an integer. The value range is shown in Table 1. |
Socket Monitors are used to monitor and record each connection. In the RAWLINK, it also monitors the interface. A Socket Monitor records the specific focused events that happen during operations based on the differences of protocols. In addition, it also records some information in the form of log in the disk space.
Socket Monitors are equal to the black box of the system. They record the specific focused events that occur during the operations of the system. When the system fails, you can use the socket monitor to locate the fault.
You can also set the filtering rules, such as task ID, socket ID, and socket type, so only the information matching the rules are displayed. 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 information of the IP socket.
<sysname> display ip socket monitor
SOCK_STREAM:
Task = VTYD (30), socketid = 1, Proto = 6,
LA = 0.0.0.0:23, FA = 0.0.0.0:0,
sndbuf = 8192, rcvbuf = 8192, sb_cc = 0, rb_cc = 0,
socket option = SO_ACCEPTCONN SO_KEEPALIVE SO_REUSEPORT SO_SENDVPNID (14849) SO_S
ETKEEPALIVE,
socket state = SS_PRIV SS_ASYNC
Socket Monitor:
Asyn Que status:
read = 0, write = 0, connect = 0, close = 0,
peerclose = 0, accept = 0, keepalivedown = 0,
cram time = 00H00M00S, lost msg= 0, msg type=0x00000000;
Nothing else has been captured!
SOCK_DGRAM:
Task = ULOG (150), socketid = 2, Proto = 17,
LA = 0.0.0.0:67, FA = 0.0.0.0:0,
sndbuf = 9216, rcvbuf = 41600, sb_cc = 0, rb_cc = 0,
socket option = SO_BROADCAST SO_REUSEPORT SO_UDPCHECKSUM SO_SENDVPNID (14849),
socket state = SS_PRIV
Socket Monitor:
Statistics:
Input packets = 6,Recv packets = 6,Output packets = 0;
Rcvbuf status:
Cram time = 00H00M00S: full times = 0,dropped packets = 0;
Asyn Que status:
read = 0, write = 0, connect = 0, close = 0,
peerclose = 0, accept = 0, keepalivedown = 0,
cram time = 00H00M00S, lost msg = 0, msg type = 0x00000000;
# Display information about the IP socket with the task ID as 23 and socket ID as 1.
<sysname> display ip socket monitor task-id 23 socket-id 1
Task = RSVP (23), socketid = 1, Proto = 46,
LA = 0.0.0.0, FA = 0.0.0.0,
sndbuf = 4194304, rcvbuf = 4194304, sb_cc = 0, rb_cc = 0,
socket option = 0,
socket state = SS_PRIV SS_NBIO SS_ASYNC
Socket Monitor:
Statistics:
Input packets = 0,Recv packets = 0,Output packets = 0;
Rcvbuf status:
Cram time = 00H00M00S: full times = 0,dropped packets = 0;
Asyn Que status:
read = 0, write = 0, connect = 0, close = 0,
peerclose = 0, accept = 0, keepalivedown = 0,
cram time = 00H00M00S, lost msg = 0, msg type = 0x00000000;
# Display information about the IP socket with the socket type as TCP.
<sysname> display ip socket monitor sock-type 1
SOCK_STREAM:
Task = VTYD (30), socketid = 1, Proto = 6,
LA = 0.0.0.0:23, FA = 0.0.0.0:0,
sndbuf = 8192, rcvbuf = 8192, sb_cc = 0, rb_cc = 0,
socket option = SO_ACCEPTCONN SO_KEEPALIVE SO_REUSEPORT SO_SENDVPNID (14849) SO_S
ETKEEPALIVE,
socket state = SS_PRIV SS_ASYNC
Socket Monitor:
Asyn Que status:
read = 0, write = 0, connect = 0, close = 0,
peerclose = 0, accept = 0, keepalivedown = 0,
cram time = 00H00M00S, lost msg= 0, msg type=0x00000000;
Nothing else has been captured!
Item |
Description |
|---|---|
SOCK_STREAM |
Socket type:
|
Task = VTYD (30) |
Type and ID of the task that needs to use the socket. For example, the task named VTYD uses the socket, with the task ID being 30. |
socketid = 11 |
Socket ID. |
Proto = 6 |
Protocol number. |
LA = 0.0.0.0:23, FA = 0.0.0.0:0, |
|
sndbuf = 8192, rcvbuf = 8192, sb_cc = 0, rb_cc = 0, |
|
socket option = SO_ACCEPTCONN SO_KEEPALIVE SO_REUSEPORT SO_SENDVPNID (14849) SO_SETKEEPALIVE, |
Displays the set socket options:
|
VPNID (14849) |
VPN ID |
socket state = SS_PRIV SS_ASYNC |
Status of the socket:
|
Asyn Que status |
Status of the current asynchronous queue. |
read=0 |
Number of the message read by the current asynchronous queue is 0. |
write=0 |
Number of the messages written by the current asynchronous queue is 0. |
connect=0 |
Number of the connection message in the current asynchronous queue is 0. |
close=0 |
Number of the messages about closed connections in the current asynchronous queue is 0. |
peerclose=0 |
Number of the messages about connections closed by the remote end in the current asynchronous queue is 0. |
accept=0 |
Number of messages accepted by the current asynchronous queue is 0. |
keepalivedown=0 |
Number of the keepalive messages in the asynchronous queue is 0. |
cram time=00H00M00S |
Time of the asynchronous queue becoming full is 0 hours 0 minutes, and 0 seconds. |
lost msg=0 |
Number of the asynchronous messages discarded by the asynchronous queue is 0. |
msg type |
Type of the current asynchronous messages. |