1TTCP(1)                     General Commands Manual                    TTCP(1)
2
3
4

NAME

6       ttcp - test TCP and UDP performance
7

SYNOPSIS

9       ttcp   -t   [-u]  [-s]  [-p port]  [-l buflen]  [-b size]  [-n numbufs]
10       [-A align] [-O offset] [-f format] [-D] [-v] host [<in]
11       ttcp -r [-u] [-s] [-p port] [-l buflen] [-b size]  [-A align]  [-O off‐
12       set] [-f format] [-B] [-T] [-v] [>out]
13

DESCRIPTION

15       Ttcp  times  the transmission and reception of data between two systems
16       using the UDP or TCP  protocols.   It  differs  from  common  ``blast''
17       tests,  which  tend  to measure the remote inetd as much as the network
18       performance, and which usually do not allow measurements at the  remote
19       end of a UDP transmission.
20
21       For testing, the transmitter should be started with -t and -s after the
22       receiver has been started with -r and -s.  Tests lasting at least  tens
23       of  seconds  should be used to obtain accurate measurements.  Graphical
24       presentations of throughput versus buffer size for buffers ranging from
25       tens of bytes to several ``pages'' can illuminate bottlenecks.
26
27       Ttcp  can also be used as a ``network pipe'' for moving directory hier‐
28       archies between systems when routing problems exist or when the use  of
29       other  mechanisms  is  undesirable.  For  example,  on  the destination
30       machine, use: ttcp -r -B | tar xvpf -
31
32       and on the source machine: tar cf - directory | ttcp -t dest_machine
33
34       Additional intermediate machines can be included by: ttcp -r | ttcp  -t
35       next_machine
36

OPTIONS

38       -t        Transmit mode.
39
40       -r        Receive mode.
41
42       -u        Use UDP instead of TCP.
43
44       -s        If transmitting, source a data pattern to network; if receiv‐
45                 ing, sink (discard) the data.  Without  the  -s  option,  the
46                 default  is to transmit data from stdin or print the received
47                 data to stdout.
48
49       -l length Length of buffers in bytes (default  8192).   For  UDP,  this
50                 value is the number of data bytes in each packet.  The system
51                 limits the maximum UDP  packet  length.  This  limit  can  be
52                 changed with the -b option.
53
54       -b size   Set size of socket buffer.  The default varies from system to
55                 system.   This  parameter  affects  the  maximum  UDP  packet
56                 length.  It may not be possible to set this parameter on some
57                 systems (for example, 4.2BSD).
58
59       -n numbufs
60                 Number of source buffers transmitted (default 2048).
61
62       -p port   Port number to send to or listen on (default 2000).  On  some
63                 systems,  this  port may be allocated to another network dae‐
64                 mon.
65
66       -D        If transmitting using TCP, do not buffer  data  when  sending
67                 (sets the TCP_NODELAY socket option).  It may not be possible
68                 to set this parameter on some systems (for example, 4.2BSD).
69
70       -B        When receiving data, output only full blocks, using the block
71                 size  specified  by  -l.  This option is useful for programs,
72                 such as tar(1), that require complete blocks.
73
74       -A align  Align the start of buffers to this modulus (default 16384).
75
76       -O offset Align the start of buffers to this offset (default  0).   For
77                 example, ``-A8192 -O1'' causes buffers to start at the second
78                 byte of an 8192-byte page.
79
80       -f format Specify, using one of the following characters, the format of
81                 the  throughput  rates  as  kilobits/sec ('k'), kilobytes/sec
82                 ('K'), megabits/sec ('m'), megabytes/sec ('M'),  gigabits/sec
83                 ('g'), or gigabytes/sec ('G').  The default is 'K'.
84
85       -T        ``Touch'' the data as they are read in order to measure cache
86                 effects.
87
88       -v        Verbose: print more statistics.
89
90       -d        Debug: set the SO_DEBUG socket option.
91

SEE ALSO

93       ping(1M), traceroute(1M), netsnoop(1M)
94
95
96
97                                     local                             TTCP(1)
Impressum