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
11       ttcp -r [-u] [-s] [-p port] [-l buflen] [-b size]  [-A align]  [-O off‐
12       set] [-f format] [-B] [-T] [-v]
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:
31       ttcp -r -B | tar xvpf -
32
33       and on the source machine:
34       tar cf - directory | ttcp -t dest_machine
35
36       Additional intermediate machines can be included by:
37       ttcp -r | ttcp -t next_machine
38

OPTIONS

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

SEE ALSO

95       ping(1M), traceroute(1M), netsnoop(1M)
96
97
98
99                                     local                             TTCP(1)
Impressum