SMC_RUN(8)

πŸ“¦
version 1.8.8 Β· 2 versions
, in centos-stream 10, centos-stream 9, fedora 43, fedora 44, opensuse-leap 16.0, ubuntu jammy, ubuntu noble, ubuntu questing

✨ SMC_RUN πŸ’… (that's section 8 of the Linux Programmer's Manual, bestie)

Okay so picture this: you've got a program, right, and it wants to do TCP things, and you're like "bestie... what if SMC instead?" That's literally the whole gig. smc_run starts a program with the ability to use SMC as its networking protocol. Iconic behavior only. πŸ¦‹


🌸 SYNOPSIS 🌸

smc_run [-dhrtv][-r SIZE] [-t SIZE] program parameters

πŸ’– DESCRIPTION πŸ’–

smc_run starts a program β€” you pass it as the argument, along with all its own parameters β€” and lets that program's TCP socket connections use the SMC protocol. Main character energy for your sockets, no cap. ✨

Here's the tea on how it works: the script specifies libsmc-preload.so as a preload shared library for the Linux program loader 🧚, and it may adjust the transmit and receive buffer sizes to SIZE by setting the socket options SO_SNDBUF and SO_RCVBUF respectively. And SIZE? You can give it in Bytes, or use the metric prefixes k and m β€” like 8k...1024k/1m. Slay, flexible units. πŸ’…

The preload library libsmc-preload.so intercepts a few TCP socket calls and triggers the equivalent execution through SMC. Sneaky? No. Efficient? Yes. πŸ”₯

Note, bestie, listen: if it's not possible to use smc_run, you can install libsmc-preload.so as a preload library via the environment variable LD_PRELOAD. And use the environment variables SMC_SNDBUF and SMC_RCVBUF to request specific transmit and receive buffer sizes respectively. Supports metric prefixes k and m. πŸ’œ

The following options can be specified:

  • -d β€” display additional diagnostic messages during the program execution. Detective mode πŸ•΅οΈβ€β™€οΈ
  • -h β€” display a brief usage information. Short and sweet, we love a quick rundown πŸŽ€
  • -r SIZE β€” request receive buffer size SIZE. Notes, because details matter:
    • May be overridden by the application. πŸ™ˆ
    • Increases net.core.rmem_max if necessary.
  • -t SIZE β€” request transmit buffer size SIZE. Notes again, same vibe:
    • May be overridden by the application. πŸ™ˆ
    • Increases net.core.wmem_max if necessary.
  • -v β€” display version information. Gotta know what you're running, bestie ⭐

🌈 RETURN CODES 🌈

On success, the smc_run command returns 0. πŸŽ‰ If an error occurs, smc_run writes a message to stdout and completes with a return code other than 0 β€” so, like, not a slay.

  • 1 β€” an invalid option was specified. 😭 (we've all been there)

πŸ“ EXAMPLES πŸ“

Run program foo using SMC, requesting a receive buffer size of 512KB:

$ smc_run -r 512k ./foo

Look at her go. πŸ‘‘


🫢 SEE ALSO 🫢

af_smc(7), smc_chk(8) smc_pnet(8), smc_rnics(8), smcd(8), smcr(8), smcss(8), tcp(7)


That's the whole page, bestie β€” brought to you by smc-tools, dated January 2017, and yes this is still SMC_RUN(8) in case you lost track. Mwah. πŸ’‹πŸŽ€