Obtaining statistics for SMC connections

Ubuntu 22.04 LTS LPAR mode z/VM guest KVM guest

Separate statistical information is available about SMC-R and SMC-D connections. Use the smcr stats command to show the SMC-R statistics, and the smcd stats command to show the SMC-D statistics.

Command syntax

Read syntax diagramSkip visual syntax diagramsmcrsmcd-d-astatsshowresetjson
Where:
-d or --details
displays detailed statistics, see Expanded output for details mode.
-a or --absolute
ignores any counter resets and displays statistics beginning with smc module load.
reset
displays the current statistics and resets the counters for SMC-R or SMC-D to zero.
json
displays the current statistics in JSON format.

For command help information, enter smcr stats help, smcd stats help, or see the smcr-stats or smcd-stats man page.

Examples

  • To show SMC-D statistics:
    # smcd stats
  • To show detailed SMC-R statistics and reset the SMC-R statistics counters:
    # smcr -d stats reset
  • To ignore any counter resets and show detailed SMC-R statistics since module load in JSON format:
    # smcr -da stats json

Command output

The command output shows several counters with the following meanings:
Total connections handled
The total number of connections handled by the smc module. This number includes TCP fallback connections and handshake errors.
SMC connections
The number of connections that successfully entered the SMC mode.
Handshake errors
The number of connections that failed because of errors during the handshake phase, for example, because the peer stopped responding.
Avg requests per SMC conn
The average number of requests sent and received per SMC connection. This number includes special socket calls.
TCP fallback
The number of connections that fell back to TCP/IP.
Data transmitted
The amount of data sent (TX) or received (RX) in Bytes.
Total requests
The total number of individual send (TX) or receive (RX) requests handled. This number includes requests that ended with errors or did not transfer any data.
Buffer full
The number of occurrences where the respective send buffer (TX) could not contain all data to be sent, or did not contain as much data as requested in a receive() call (RX).
Bufs
A histogram of buffer sizes for all connections, including buffer downgrades and buffer reuses. The histogram scale presents exact buffer sizes.
Reqs
A histogram of request sizes. The histogram scale includes upper boundaries of request sizes. Counts reflect requested send sizes for TX, and actual receive sizes for RX. Other than Total requests, this count omits erroneous requests and requests that do not transfer any data.
Special socket calls
Summarizes the total number of sockets calls that require special handling in SMC. The -d option categorizes these calls, see Expanded output for details mode.

Expanded output for details mode

With the -d option, the command output includes all counters of the regular mode, some of them with more detailed information:
SMC connections
Shows the SMC connections by SMC version, and shows separate counts for client and server.
Handshake errors | TCP fallback
Show separate counts for client and server.
Special socket calls
Shows the total number of sockets calls that require special handling in SMC and categorizes them into the following individual counters:
cork
The number of sockopt TCP_CORK enablements. This counter does not reflect the number of send requests with TCP_CORK enabled.
nodelay
The number of sockopt TCP_NODELAY enablements. This counter does not reflect the number of send requests with TCP_NODELAY enabled.
sendpage
The number of AF_SMC implementations of the sendpage() call.
splice
The number calls of the splice() system call.
urgent data
The number of send() and receive() calls with MSG_OOB set.
The counters with the following labels are shown only with the -d option:
Buffer full (remote)
The number of occurrences where the peer’s receive buffer was exceeded by writing data. Requests that fill the buffer to the last bit are not included in this count.
Buffer too small
The number of occurrences where a send request was larger than the local send buffer’s total capacity.
Buffer too small (remote)
The number of occurrences where a send request exceeded the total capacity of the peer’s receive buffer.
Buffer downgrades
The number of occurrences where a buffer of the requested size could not be allocated for a new connection, and a smaller buffer was used.
Buffer reuses
The number of occurrences where a buffer was provided as requested for a new connection by reusing a buffer from a previous connection.