The display ip socket command displays information about a specified or all types of sockets.
The display ipv6 socket command displays information about IPv6 sockets.
Parameter | Description | Value |
---|---|---|
socket-type socket-type |
Displays information about sockets of a specified type. |
The value is an integer ranging from 1 to 4:
|
cid cid |
Displays socket information of the APP with a specified CID. |
The value ranges from 0x0 to 0xffffffff, in hexadecimal notation. The default value is 0x0. |
socket-id socket-id |
Displays information about the socket with a specified ID. |
The value is an integer ranging from 0 to 2147418111. |
Usage Scenario
To check socket information, run the display ip socket command. A filtering rule, such as a PID, socket ID, or socket type, can be specified so that only the information matching the rule is displayed. This reduces the amount of output information, improving output information usability and fault locating accuracy and efficiency.
The command can be used to display information about a specific type or all types of sockets.Precautions
No information will be displayed if there is no information about sockets.
If no parameter is specified, information about all types of sockets is displayed.The actual command output varies according to the device. The command output here is only an example.
<HUAWEI> display ip socket
Total: 2
Cid = 0x80262711, socketid = 0, Proto = 17,
LA=0.0.0.0:123, FA=0.0.0.0:0,
sndbuf = 0, rcvbuf = 0, sb_cc = 0, rb_cc = 0,
socket option = SO_REUSEADDR ,
socket state = SS_NBIO SS_ASYNC
Cid = 0x8035272E, socketid = 0, Proto = 17,
LA=0.0.0.0:1024, FA=0.0.0.0:0,
sndbuf = 0, rcvbuf = 0, sb_cc = 0, rb_cc = 0,
socket option = SO_REUSEADDR ,
socket state = SS_NBIO SS_ASYNC
<HUAWEI> display ipv6 socket
Total: 2
Cid = 0x8035272E, socketid = 1, Proto = 17,
LA=:::1024, FA=:::0,
sndbuf = 0, rcvbuf = 0, sb_cc = 0, rb_cc = 0,
socket option = SO_REUSEADDR ,
socket state = SS_NBIO SS_ASYNC
Cid = 0x80C8272D, socketid = 3, Proto = 6,
LA = ::->23, FA = ::->0,
sndbuf = 0, rcvbuf = 0, sb_cc = 0, rb_cc = 0,
socket option = SO_REUSEADDR SO_ACCEPTCONN SO_REUSEADDR ,
socket state = SS_NBIO SS_ASYNC SS_NBIO SS_ASYNC
Item | Description |
---|---|
socket option | Socket options that have been set:
|
socket state | Socket status:
|
Cid | Indicates the CID of the APP component. |
socketid | Indicates the socket ID. |
Proto | Indicates the protocol ID. |
sndbuf | Indicates the upper limit of the cache of packet sending. |
rcvbuf | Indicates the upper limit of the cache of packet receiving. |
sb_cc | Number of sent packets, valid only when TCP caches data. |
rb_cc | Number of received packets. |
LA | Local address. |
FA | Foreign address, which means a remote address. |
Total | Indicates the total number of socket instances. |