目录

Key Fields in Fault Logs

This section describes the key fields in fault logs of the Remote Communication Kit (RCP) module, including the data type and meaning of each field.

Fault Log Examples

When an error occurs in a network request initiated through RCP, the error information contains the extendInfo field, which records the key log information required for troubleshooting. To further improve the troubleshooting capability, more fields may be added to logs in the future. The following is an example of error information:

{"code":1007900035,"data":"SSL connect error","extendInfo":{"httpPhase":"011000","dnsDur":"0.31","tcpDur":"43.57","tlsDur":"0.00","sndDur":"0.00","rcvDur":"0.00","totDur":"0.0","redDur":"0.00","osErr":"2","sptIP6":"1",
"proxyType":"none","uptProxyMs":"0","peer":"0.0.**.**","lastOsIn":"0:0:0.0","lastOsOut":"0:0:0.0","sock":"100","sslErr":"error:0A000410:SSL routines::sslv3 alert handshake failure","minTlsVersion":"TLS1.3","maxTlsVersion":"TLS1.3"}}

The following describes the fields that may be recorded.

Basic Information Fields

[h2]NetworkError

Value type: string

Field description: network error description It displays the possible error description.

[h2]httpPhase

Value type: integer

Field description: HTTP phase status code, which is used to identify the progress of request execution. The value of httpPhase is a 6-bit number consisting of 1 or 0. Currently, the HTTP execution process is divided into six phases: dns (DNS resolution starts), tcp (TCP handshake starts and DNS ends), tls (TLS handshake starts and TCP ends), snd (request sending starts and TLS ends), rcv (response header receiving starts and SND ends), and bdy (response body receiving starts and RCV ends). When each phase starts, the corresponding bit value is 1.

The following table lists the possible values of httpPhase and their descriptions.

dns tcp tls snd rcv bdy httpPhase Value Description
1 1 1 1 1 1 111111 Response body receiving phase
1 1 1 1 1 0 111110 Response header receiving phase
1 1 1 1 0 0 111100 Request sending phase
1 1 1 0 0 0 111000 TLS phase
1 1 0 0 0 0 110000 TCP phase
1 0 0 0 0 0 100000 DNS phase

When the DNS response comes from the cache instead of the query, dns is set to 0. The following table lists several possible cases.

dns tcp tls snd rcv bdy httpPhase Value Description
0 1 1 1 1 1 011111 (DNS from cache) Response body receiving phase
0 1 1 1 1 0 011110 (DNS from cache) Response header receiving phase
0 1 1 1 0 0 011100 (DNS from cache) Request sending phase
0 1 1 0 0 0 011000 (DNS from cache) TLS phase
0 1 0 0 0 0 010000 (DNS from cache) TCP phase

After connection reuse is enabled, tcp and tls are set to 0. The following table lists several possible cases.

dns tcp tls snd rcv bdy httpPhase Value Description
0 0 0 1 1 1 000111 (Connection reuse) Response body receiving phase
0 0 0 1 1 0 000110 (Connection reuse) Response header receiving phase
0 0 0 1 0 0 000100 (Connection reuse) Request sending phase
1 0 0 1 1 1 100111 (Connection reuse) Response body receiving phase
1 0 0 1 1 0 100110 (Connection reuse) Response header receiving phase
1 0 0 1 0 0 100100 (Connection reuse) Request sending phase

Time Consumption Fields

[h2]dnsDur

Data type: floating point number

Field description: DNS resolution duration, in milliseconds. It indicates the duration from the time when a request is initiated to the time when DNS resolution is complete.

[h2]tcpDur

Data type: floating point number

Field description: TCP connection duration, in milliseconds. It indicates the duration from the time when DNS resolution is complete to the time when a TCP connection is established.

[h2]tlsDur

Data type: floating point number

Field description: TLS handshake duration, in milliseconds. It indicates the duration from the time when a TCP connection is established to the time when a TLS handshake is complete.

[h2]sndDur

Data type: floating point number

Field description: request sending duration, in milliseconds. It indicates the duration from the time when all connection handshakes are complete to the time when an HTTP request starts to be sent.

[h2]rcvDur

Data type: floating point number

Field description: response receiving duration, in milliseconds. It indicates the duration from the time when an HTTP request starts to be sent to the time when the response header starts to be received.

[h2]totDur

Data type: floating point number

Field description: total request duration, in milliseconds. It indicates the total duration from the time when a request is initiated to the time when the response is completely received.

[h2]redDur

Data type: floating point number

Field description: redirection duration, in milliseconds. It indicates the time taken to process the redirection response.

System Error Field

[h2]osErr

Value type: integer

Field description: OS error code. For details, please refer to Kernel Error Codes.

Network Configuration Fields

[h2]sptIP6

Value type: integer

Field description: indicates whether IPv6 is supported. The value 0 indicates no, and 1 indicates yes.

[h2]proxyType

Value type: string

Field description: proxy type

[h2]uptProxyMs

Value type: integer

Field description: proxy handshake duration, in milliseconds. The value 0 indicates that no proxy is used.

[h2]proxyCode

Value type: integer

Field description: proxy status code. The value 0 indicates that no error occurs.

[h2]proxyErr

Value type: integer

Field description: proxy error code. The value 0 indicates that no error occurs.

[h2]tryDns

Value type: string list

Field description: DNS server to be connected. The value is a list of IP addresses separated by commas (,), for example, 8.8.*.*,8.8.*.*.

[h2]connDns

Value type: string list

Field description: connected DNS server. The value is a valid IP address.

[h2]recvDns

Value type: string list

Field description: DNS server that receives the response. The value is a valid IP address.

[h2]dnsStatus

Value type: integer

Field description: DNS status code. The value 0 indicates success, 1 indicates that an IP address is available and the request is normal, 2 indicates that only the CNAME is obtained, and 3 indicates that the packet is invalid.

[h2]dnsFromNetsys

Value type: integer

Field description: indicates whether the DNS is from the network system cache. The value 0 indicates that the DNS is obtained from DNS server resolution, and 1 indicates that the DNS is obtained from the network system cache.

[h2]dnsSockE

Value type: integer

Field description: DNS socket error code. The value 0 indicates that no error occurs.

[h2]dnsCloseE

Value type: integer

Field description: DNS closure error code. The value 0 indicates that no error occurs.

[h2]dnsConnE

Value type: integer

Field description: DNS connection error code. The value 0 indicates that no error occurs.

[h2]dnsRecvE

Value type: integer

Field description: DNS receiving error code. The value 0 indicates that no error occurs.

[h2]dnsSendE

Value type: integer

Field description: DNS sending error code. The value 0 indicates that no error occurs.

[h2]dnsRuleValidate

Value type: string list

Field description: DNS rule verification.

Connection Information Fields

[h2]srcAddr

Value type: string

Field description: source address. The value is in IPv4 or IPv6 format.

[h2]srcPort

Value type: integer

Field description: source port

[h2]dstAddr

Value type: string

Field description: destination address. The value is in IPv4 or IPv6 format.

[h2]dstPort

Value type: integer

Field description: destination port

[h2]peer

Value type: string

Field description: peer address.

[h2]sock

Value type: integer

Field description: socket handle. The normal value is a positive integer.

[h2]reused

Value type: integer

Field description: indicates whether the connection is reused. The value 0 indicates that a new connection is established, and 1 indicates that the connection is reused.

[h2]sockType

Value type: string

Field description: socket type

[h2]tryConnV4

Value type: integer

Field description: number of IPv4 connection attempts

[h2]tryConnV6

Value type: integer

Field description: number of IPv6 connection attempts

[h2]tryConnIp

Value type: string list

Field description: IP address to be connected. Multiple IP addresses are separated by commas (,).

[h2]tryConnPort

Value type: string list

Field description: port to be connected. Multiple ports are separated by commas (,).

[h2]tcpConnE

Value type: integer

Field description: TCP connection error code. The value 0 indicates that no error occurs.

Transmission Statistics Fields

[h2]dlSpeed

Value type: long integer

Field description: download speed, in bytes/s

[h2]ulSpeed

Value type: long integer

Field description: download speed, in bytes/s

[h2]dlSz

Value type: long integer

Field description: number of downloaded bytes

[h2]ulSz

Value type: long integer

Field description: number of uploaded bytes

SSL/TLS Fields

[h2]sslConnE

Value type: integer

Field description: SSL connection error code. The value 0 indicates that no error occurs.

[h2]sslErr

Value type: string

Field description: SSL error description. If the value is empty, no error occurs. Otherwise, the specific error information is displayed.

[h2]lstSendE

Value type: integer

Field description: last sending error code

[h2]lastRecvE

Value type: integer

Field description: last receiving error code

[h2]lastSslRecvE

Value type: string

Field description: last SSL receiving error If the value is empty, no error occurs. Otherwise, the specific error information is displayed.

[h2]lastSslRendE

Value type: string

Field description: last SSL handshake error If the value is empty, no error occurs. Otherwise, the specific error information is displayed.

[h2]minTlsVersion

Value type: string

Field description: minimum TLS version

[h2]maxTlsVersion

Value type: string

Field description: maximum TLS version

[h2]tstGlbUsr

Value type: integer

Field description: indicates whether to trust the global user certificate. The value 0 indicates no, and 1 indicates yes.

[h2]tstCurUsr

Value type: integer

Field description: indicates whether to trust the current user certificate. The value 0 indicates no, and 1 indicates yes.

[h2]selfCaPath

Value type: integer

Field description: indicates whether to use a custom CA certificate path. The value 0 indicates no, and 1 indicates yes.

[h2]selfCaFile

Value type: integer

Field description: indicates whether to use a custom CA certificate file. The value 0 indicates no, and 1 indicates yes.

[h2]selfCaBlob

Value type: integer

Field description: indicates whether to use custom CA binary data. The value 0 indicates no, and 1 indicates yes.

[h2]caFun

Value type: string

Field description: indicates whether to use a custom verification function. The value true indicates yes, and false indicates no.

[h2]issuers

Value type: string list

Field description: certificate issuer list, which is separated by commas (,)

[h2]lastSslRecvSz

Value type: long integer

Field description: number of bytes received over SSL for the last time

[h2]lastSslSendSz

Value type: long integer

Field description: number of bytes sent over SSL for the last time

[h2]totalSslRecvSz

Value type: long integer

Field description: total number of bytes received over SSL

[h2]totalSslSendSz

Value type: long integer

Field description: total number of bytes sent over SSL

Timeout Configuration Fields

[h2]cfgConnectMs

Value type: integer

Field description: configured connection timeout interval, in milliseconds

[h2]cfgTransferMs

Value type: integer

Field description: configured transmission timeout interval, in milliseconds

HTTP Content Fields

[h2]reqLen

Value type: integer

Field description: request length

[h2]respLen

Value type: integer

Field description: response length

Weak Network Detection Fields

[h2]lastOsIn

Value type: string

Field description: last time when the operating system receives data

[h2]lastOsOut

Value type: string

Field description: last time when the operating system sends data

[h2]headerOutSz

Value type: integer

Field description: size of the sent header, in bytes

[h2]headerInSz

Value type: integer

Field description: size of the received header, in bytes

VPN and Application Fields

[h2]vpnEnabled

Value type: integer

Field description: indicates whether the VPN is enabled. The value 0 indicates no, and 1 indicates yes.

[h2]appNetId

Value type: integer

Field description: application network ID