TTCP (network throughput test) - Linux

OS: 
Function: 
Summary
  • Used to generate synthetic UDP and TCP traffic loads.The ttcp command is an essential utility program for debugging  problems in IP networks.
Detailed Description
  • In order to run the ttcp tool, you must set up a ttcp  receiver on one host and then a ttcp sender on another host. When the ttcp sender is started, it blasts the specified amount of data as fast as possible to the ttcp receiver.
  • By default, ttcp transmits data over a  TCP connection. The ttcp sender opens a TCP connection to a ttcp receiver, transmits data, and then closes the connection. The ttcp receiver must be running when the ttcp sender is started. UDP data transfer is specified with the -u option. Since UDP is a connectionless protocol, the ttcp sender starts immediately sending UDP datagrams, regardless of whether a ttcp receiver is established.
Command Syntax
    • ttcp -t [-u] [-s] [-p port] [-l buflen] [-b size] [-n numbufs] [-A align] [-O offset] [-f format][-D] [-v] host [<in]
    • ttcp -r [-u] [-s] [-p port] [-l buflen] [-b size] [-A align] [-O offset] [-f format] [-B] [-T] [-v] [>out]
ExamplesTransmitting data with UDP consists of setting up a UDP data transfer between two hosts, PC1 and PC2.
  • Example command for transmitting data with UDP:
PC2% ttcp -rs -l1024 -n10 -p4444 -u -Start a ttcp receiver that receives UDP traffic.
PC1% ttcp -ts -l1024 -n10 -p4444 -u 10.0.5.22 -Start a ttcp sender that transmits UDP traffic.

 

Transmitting data with UDP consists of setting up a UDP data transfer between two hosts, PC1 and PC2.

  • Example command for transmitting data with TCP:
PC2% ttcp -rs -l1024 -n10 -p4444 Start a ttcp receiver on PC2 that receives packets sent by PC1
PC1% ttcp -ts -l1024 -n10 -p4444 -D 10.0.5.22 Start a ttcp sender on PC1 that transmits packets from PC1 to PC2.