TTCP(1)

πŸ“¦
version 1.12 Β· 4 versions
, in fedora 43, fedora 44

πŸ’… TTCP(1) β€” the manual, but make it cute

okay bestie, so ttcp is a General Commands Manual page and it's literally the blueprint for testing how fast your TCP and UDP are talking to each other. no cap. sit down, hydrate, and let's get into it 🫢


✨ NAME ✨

ttcp β€” test TCP and UDP performance 🌈


πŸŽ€ SYNOPSIS πŸŽ€

ttcp -t [-u] [-s] [-p port] [-l buflen] [-b size] [-n numbufs]
[-A align] [-O offset] [-f format] [-D] [-v] host
ttcp -r [-u] [-s] [-p port] [-l buflen] [-b size] [-A align] [-O offset]
[-f format] [-B] [-T] [-v]

two whole modes, two whole vibes. transmitters and receivers are different girls πŸ’–


πŸ¦‹ DESCRIPTION πŸ¦‹

so Ttcp times how long it takes to transmit and receive data between two systems, using the UDP or TCP protocols. that's the whole job. iconic behaviour honestly.

the way it's different from the common "blast" tests?? those ones lowkey measure the remote inetd as much as the actual network performance 😭 and they usually don't even let you measure anything at the remote end of a UDP transmission. not it. ttcp could never.

for testing, the transmitter should be started with -t and -s after the receiver has been started with -r and -s. order matters bestie, don't start the transmitter first, that's the whole point ✨

tests lasting at least tens of seconds should be used to get accurate measurements. short tests are giving nothing. periodt.

and honestly? graphical presentations of throughput versus buffer size β€” for buffers ranging from tens of bytes all the way to several "pages" β€” can illuminate bottlenecks. plot it, queen πŸ“ˆ

Ttcp can also be used as a "network pipe" for moving directory hierarchies between systems when routing problems exist, or when using other mechanisms is just... undesirable πŸ™ˆ

for example, on the destination machine, use:

ttcp -r -B | tar xvpf -

and on the source machine:

tar cf - directory | ttcp -t dest_machine

and if you wanna include additional intermediate machines (a whole relay chain, main character energy πŸ‘‘):

ttcp -r | ttcp -t next_machine

🌸 OPTIONS 🌸

  • -t β€” transmit mode, bestie. it transmits the data presented on standard input πŸ“€
  • -r β€” receive mode. sends the received data to standard output πŸ“₯
  • -u β€” use UDP instead of TCP. chaotic, but valid πŸ’€
  • -s β€” if transmitting, source a data pattern to network; if receiving, sink (discard) the data. without the -s option, the default is to transmit data from stdin or print the received data to stdout πŸŒ€
  • -l length β€” length of buffers in bytes (default 8192). for UDP, this value is the number of data bytes in each packet. the system limits the maximum UDP packet length, and that limit can be changed with the -b option ⭐
  • -b size β€” set size of socket buffer. the default varies from system to system πŸ™ƒ this parameter affects the maximum UDP packet length. it may not be possible to set this parameter on some systems (for example, 4.2BSD) 😭
  • -n numbufs β€” number of source buffers transmitted (default 2048) πŸ”’
  • -p port β€” port number to send to or listen on (default 2000). on some systems, this port may be allocated to another network daemon, so heads up πŸ‘€
  • -D β€” if transmitting using TCP, do not buffer data when sending (sets the TCP_NODELAY socket option). it may not be possible to set this parameter on some systems (for example, 4.2BSD) πŸ’…
  • -B β€” when receiving data, output only full blocks, using the block size specified by -l. this option is useful for programs, such as tar(1), that require complete blocks 🧱
  • -A align β€” align the start of buffers to this modulus (default 16384) πŸ“
  • -O offset β€” align the start of buffers to this offset (default 0). for example, `-A8192 -O1` causes buffers to start at the second byte of an 8192-byte page 🎯
  • -f format β€” specify, using one of the following characters, the format of the throughput rates as kilobits/sec ('k'), kilobytes/sec ('K'), megabits/sec ('m'), megabytes/sec ('M'), gigabits/sec ('g'), or gigabytes/sec ('G'). the default is 'K' ✨
  • -T β€” "Touch" the data as they are read in order to measure cache effects. touch grass, but for buffers 🌱
  • -v β€” verbose: print more statistics πŸ“Š
  • -d β€” debug: set the SO_DEBUG socket option πŸ›

🫢 SEE ALSO 🫢

ping(1M), traceroute(1M), netsnoop(1M) β€” go read those too, they're the friend group πŸ’œ


okay that's the whole page, we ate and left no crumbs πŸ‘‘ this was the TTCP(1) page from the local source, filed under TTCP(1). mwah, go test your network bestie πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from