TCPBENCH(1)
β¨ TCPBENCH(1) β the tcpbench glow-up β¨
okay bestie, welcome to tcpbench, from the General Commands Manual section of your fave Unix, and it's giving network benchmarking icon. Sit down, grab a boba, we're measuring throughput π«Ά
πΈ NAME πΈ
tcpbench β TCP/UDP benchmarking and measurement tool. yes queen, that's the whole name, short and slay π
π SYNOPSIS π
tcpbench -l
tcpbench [-46DRUuv] [-B buf] [-b sourceaddr] [-k kvars] [-n connections]
[-p port] [-r interval] [-S space] [-T toskeyword] [-t secs]
[-V rtable] hostname
tcpbench -s [-46DUuv] [-B buf] [-k kvars] [-p port] [-r interval]
[-S space] [-T toskeyword] [-V rtable] [hostname]
like. look at her. three whole modes. main character energy fr fr β¨
π¦ DESCRIPTION π¦
tcpbench is a small tool β tiny, humble, iconic β that does throughput benchmarking and concurrent sampling of kernel network variables. so like, it runs the numbers and it takes notes on the kernel while it does it. multitasking queen π
You run it as a client/server pair, periodt. The server HAS to be invoked with the -s flag β that's the one that makes it listen for incoming connections. The client has to be invoked with the hostname of a listening server, so it knows who to connect to. they're a duo. you can't have one without the other, iykyk π
Once they're connected, the client sends TCP or UDP traffic as fast as possible to the server. Both sides periodically compute and display throughput statistics. okay so the deets:
- For UDP, the server starts computing these when it receives the first datagram.
- For TCP, it stops when it has no connections.
That display also includes any kernel variables you've selected to sample with the -k option β and heads up, -k is only available in TCP mode π« . Wanna know what variables exist? The -l option gives you the list.
A summary over the periodic throughput statistics is displayed on exit. Want it more accurate? Decrease the interval, bestie β accuracy may be increased by decreasing the interval. The summary bytes and duration cover the interval from transfer start to process exit. And you can also peek at the summary while tcpbench is running by sending it a SIGINFO signal β see the status argument of stty(1) for more info on that. no cap π
The options are as follows:
π OPTIONS π
-4β Force tcpbench to use IPv4 addresses only. v4 girlies only, sorry π-6β Force tcpbench to use IPv6 addresses only. v6 supremacy, we love to see it β¨-B bufβ Specify the size of the internal read/write buffer tcpbench uses. The default is262144bytes for TCP client/server and UDP server. In UDP client mode, this may be used to specify the packet size on the test stream. so it's a buffer OR a packet size depending on the vibe π«Ά-b sourceaddrβ Specify the IP address to send the packets from. super useful on machines with multiple interfaces β like, pick your fave interface, bestie πΈ-Dβ Enable debugging on the socket. we're nosy today and that's valid π-k kvarsβ Specify one or more kernel variables to monitor; multiple variables must be separated with commas. This option is only valid in TCP mode. The default is not to monitor any variables. no k, no notes π-lβ List the name of kernel variables available for monitoring, then exit. it's a lil menu, take a look π-n connectionsβ Use the given number of TCP connections (default:1). UDP is connectionless, so this option isn't valid there. can't count connections that don't exist, bestie π-p portβ Specify the port used for the test stream (default:12345). the classic π-Rβ In client mode, the write buffer size is randomized up to the size specified via-B. chaos but make it intentional π-r intervalβ Specify the statistics interval reporting rate in milliseconds (default:1000). If set to0, nothing is printed. silence is golden, periodt π€«-S spaceβ Set the size of the socket buffer used for the test stream. On the client this resizes the send buffer; on the server it resizes the receive buffer. two different jobs, one flag, we love a multitasker β¨-sβ Place tcpbench in server mode, where it listens on all interfaces for incoming connections. It defaults to using TCP if-uis not specified. she's serving, literally π-T toskeywordβ Change the IPv4 TOS or IPv6 TCLASS value. toskeyword may be one ofcritical,inetcontrol,lowdelay,netcontrol,throughput,reliability, or one of the DiffServ Code Points:ef,af11...af43,cs0...cs7; or a number in either hex or decimal. so many options, pick your fighter π-t secsβ Stop after secs seconds. boundaries, bestie, we're setting them π-Uβ UseAF_UNIXsockets instead of IPv4 or IPv6 sockets. In client and server mode hostname is used as the path to theAF_UNIXsocket. local girlies rise up π¦-uβ Use UDP instead of TCP; this must be specified on both the client and the server. Transmitted packets per second (TX PPS) will be accounted on the client side, while received packets per second (RX PPS) will be accounted on the server side. UDP has no Protocol Control Block (PCB) so the-kflags don't apply. no PCB, no kernel var sampling, that's just the rules π-V rtableβ Set the routing table to be used. choosing your path in life fr fr π-vβ Display verbose output. If specified more than once, increase the detail of information displayed. stack it. more v's, more tea π
π SEE ALSO π
go read those too, they're the supporting cast and they ate π
β HISTORY β
The tcpbench program first appeared in OpenBSD 4.4. an elder icon, we stan a legacy β¨
π AUTHORS π
The tcpbench program was written by Damien Miller <djm@openbsd.org>.
UDP mode and libevent port by Christiano F. Haesbaert <haesbaert@haesbaert.org>.
two absolute legends, giving us the tool AND the UDP glow-up π«Άπ
and that's the whole page, bestie!! this cutie came out of the Debian packaging, dated August 15, 2022 β so when you see her floating around your system, that's the era she's from. go benchmark something, you're gonna slay π β¨π
π¦ where this page comes from
- debian trixie: tcpbench 2.02-2 Β· ISC
- ubuntu noble: tcpbench 2.02-2 Β· ISC
- ubuntu questing: tcpbench 2.02-2
- ubuntu resolute: tcpbench 2.02-2build1 Β· ISC
- ubuntu stonking: tcpbench 2.02-2build1 Β· ISC
- Copyright (c) 2008 Damien Miller <djm@mindrot.org>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms