SMCD-STATS(8)

πŸ“¦
version 1.8.8 Β· 2 versions
  • 1.8.8 Β· centos-stream 10, centos-stream 9, fedora 43, fedora 44, opensuse-leap 16.0, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking (latest)
  • 1.7.0 Β· ubuntu jammy
, in centos-stream 10, centos-stream 9, fedora 43, fedora 44, opensuse-leap 16.0, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– SMCD-STATS(8) πŸ’–

okay bestie, so this is smcd-stats and smcr-stats, both from the Linux Programmer's Manual (section 8, the sysadmin-y one, you know the vibe). One of them is giving SMC-D energy, the other is giving SMC-R energy. That's literally the whole difference. Let's get into it 🫢


✨ NAME ✨

  • smcd-stats β€” Print statistics about SMC-D usage
  • smcr-stats β€” Print statistics about SMC-R usage

two icons, two protocols, zero notes πŸ’…


🌸 SYNOPSIS 🌸

smcd [ OPTIONS ] stats  { COMMAND | help }

smcr [ OPTIONS ] stats  { COMMAND | help }

yeah it's literally the same line twice, just swap the d for an r. we love a matching set πŸ’–


πŸ¦‹ DESCRIPTION πŸ¦‹

so the smcd stats and smcr stats commands show you statistics about SMC-D and SMC-R respectively. the data includes number of connections, number of failed connections, buffer information, and special calls.

here's the tea though: statistics are collected at various data points in the smc kernel module. which means minor inconsistencies in the data can occur and are, like, completely to be expected. not a bug, it's just how the collection works. no cap 🫠


πŸŽ€ COMMANDS πŸŽ€

  • show (default) β€” Display statistics on respective SMC mode usage. Values displayed are cumulative since last reset, unless option -a/--absolute is specified.
  • reset β€” Display current statistics and reset all counters to zero.
  • json β€” Display current statistics in JSON format.

not show being the default and just showing up whether you ask or not, main character energy fr ✨


πŸ’… OPTIONS πŸ’…

  • -d, --details β€” Display additional fields and information in the output.
  • -a, --absolute β€” Display values since smc module load, ignoring any resets.

and yes, -da is a valid little combo, we'll get to that in the examples 🌈


πŸ‘‘ OUTPUT πŸ‘‘

the -d/--details option displays a number of additional fields as indicated in the following. It also breaks up a number of counters in section Connections Summary into separate counts for client and server.

πŸ“ Total connections handled

Total number of connections handled by the SMC module. Includes TCP fallback connections as well as handshake errors.

πŸ“ SMC connections

Number of connections that successfully entered the respective SMC mode. -d/--details breaks up connections by SMC versions.

πŸ“ Handshake errors

Number of connections that failed due to errors during the handshaking phase, e.g. peer no longer responding. we've all been there πŸ’€

πŸ“ Avg requests per SMC conn

Average number of requests sent and received (including special socket calls) per SMC connection.

πŸ“ TCP fallback

Number of connections that fell back to TCP/IP.

πŸ“ Data transmitted

Amount of data sent (TX) or received (RX) in Bytes.

πŸ“ Total requests

Total number of individual send (TX) or receive (RX) requests handled. Includes requests that ended with errors or did not transfer any data.

πŸ“ Buffer full

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).

πŸ“ Buffer full (remote) (--details only)

Number of occurrences where the peer's receive buffer was exceeded by writing data. That is, requests that fill the buffer up to the last bit are not included in the count.

πŸ“ Buffer too small (--details only)

Number of occurrences where a send request was larger than the local send buffer's total capacity.

πŸ“ Buffer too small (remote) (--details only)

Number of occurrences where a send request exceeded the total capacity of the peer's receive buffer.

πŸ“ Buffer downgrades (--details only)

Number of occurrences where a buffer of the requested size could not be allocated for a new connection, and a smaller buffer was used. settling, honestly πŸ₯²

πŸ“ Buffer reuses (--details only)

Number of occurrences where a buffer was provided as requested for a new connection by reusing a buffer from a previous connection. sustainable queen 🌱

πŸ“ Bufs

Histogram of buffer sizes for all connections, including buffer downgrades and buffer reuses. The histogram scale presents exact buffer sizes.

πŸ“ Reqs

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. Difference to Total requests is due to requests not transferring any data and/or erroneous requests.

πŸ“ Special socket calls

Summarizes the total number of sockets calls that require special handling in SMC. To categorize these calls into individual counters as follows, use the -d/--details option.

  • cork β€” Counts occurrences of sockopt TCP_CORK enablements. That is, does not reflect the number of send requests with TCP_CORK enabled.
  • nodelay β€” Counts occurrences of sockopt TCP_NODELAY enablements. That is, does not reflect the number of send requests with TCP_CORK enabled.
  • sendpage β€” Counts occurrences of the AF_SMC implementation of the sendpage call.
  • splice β€” Counts number of calls of the splice() system call.
  • urgent data β€” Counts number of send and receive calls with MSG_OOB set.

🌈 EXAMPLES 🌈

  1. Show SMC-D statistics:
# smcd stats
  1. Show detailed SMC-R statistics:
# smcr -d stats show
  1. Show detailed SMC-R statistics and reset SMC-R statistics counters:
# smcr -d stats reset
  1. Show detailed SMC-D statistics since module load in JSON format:
# smcd -da stats json
  1. Show SMC-R statistics since module load:
# smcr -a stats

see how example 4 stacks -d and -a into -da? obsessed. the flags are besties too 🫢


πŸ’œ SEE ALSO πŸ’œ


and that's the whole page bestie, you ate that πŸŽ€ this was smc-tools, dated June 2021, so if you're reading this from the future: hi, hope the kernel's treating you well πŸ’–βœ¨