1 | '\"macro stdmacro |
---|
2 | .TH TTCP 1 local |
---|
3 | .SH NAME |
---|
4 | ttcp \- test TCP and UDP performance |
---|
5 | .SH SYNOPSIS |
---|
6 | .B ttcp \-t |
---|
7 | .RB [ \-u ] |
---|
8 | .RB [ \-s ] |
---|
9 | .RB [ \-p\0 \fIport\fP ] |
---|
10 | .RB [ \-l\0 \fIbuflen\fP ] |
---|
11 | .RB [ \-b\0 \fIsize\fP ] |
---|
12 | .RB [ \-n\0 \fInumbufs\fP ] |
---|
13 | .RB [ \-A\0 \fIalign\fP ] |
---|
14 | .RB [ \-O\0 \fIoffset\fP ] |
---|
15 | .RB [ \-f\0 \fIformat\fP ] |
---|
16 | .RB [ \-D ] |
---|
17 | .RB [ \-v] |
---|
18 | .RB host |
---|
19 | .RB [ < in ] |
---|
20 | .br |
---|
21 | .B ttcp \-r |
---|
22 | .RB [ \-u ] |
---|
23 | .RB [ \-s ] |
---|
24 | .RB [ \-p\0 \fIport\fP ] |
---|
25 | .RB [ \-l\0 \fIbuflen\fP ] |
---|
26 | .RB [ \-b\0 \fIsize\fP ] |
---|
27 | .RB [ \-A\0 \fIalign\fP ] |
---|
28 | .RB [ \-O\0 \fIoffset\fP ] |
---|
29 | .RB [ \-f\0 \fIformat\fP ] |
---|
30 | .RB [ \-B ] |
---|
31 | .RB [ \-T ] |
---|
32 | .RB [ \-v ] |
---|
33 | .RB [ > out ] |
---|
34 | .SH DESCRIPTION |
---|
35 | .I Ttcp |
---|
36 | times the transmission and reception of data between two systems using |
---|
37 | the UDP or TCP protocols. |
---|
38 | It differs from common ``blast'' tests, which tend to measure the remote |
---|
39 | .I inetd |
---|
40 | as much as the network performance, and which usually do not allow |
---|
41 | measurements at the remote end of a UDP transmission. |
---|
42 | .PP |
---|
43 | For testing, the transmitter should be started with \f3\-t\f1 and \f3\-s\f1 |
---|
44 | after the receiver has been started with \f3\-r\f1 and \f3\-s\f1. |
---|
45 | Tests lasting at least tens of seconds should be used to obtain accurate |
---|
46 | measurements. |
---|
47 | Graphical presentations of throughput versus buffer size for |
---|
48 | buffers ranging from tens of bytes to several ``pages'' can illuminate |
---|
49 | bottlenecks. |
---|
50 | .PP |
---|
51 | .I Ttcp |
---|
52 | can also be used as a ``network pipe'' for moving directory hierarchies |
---|
53 | between systems when routing problems exist or when the use of other |
---|
54 | mechanisms is undesirable. For example, on the destination machine, use: |
---|
55 | .Ex |
---|
56 | ttcp \-r \-B | tar xvpf \- |
---|
57 | .Ee |
---|
58 | .PP |
---|
59 | and on the source machine: |
---|
60 | .Ex |
---|
61 | tar cf \- directory | ttcp \-t dest_machine |
---|
62 | .Ee |
---|
63 | .PP |
---|
64 | Additional intermediate machines can be included by: |
---|
65 | .Ex |
---|
66 | ttcp \-r | ttcp \-t next_machine |
---|
67 | .Ee |
---|
68 | .SH OPTIONS |
---|
69 | .TP 10 |
---|
70 | \-t |
---|
71 | Transmit mode. |
---|
72 | .TP 10 |
---|
73 | \-r |
---|
74 | Receive mode. |
---|
75 | .TP 10 |
---|
76 | \-u |
---|
77 | Use UDP instead of TCP. |
---|
78 | .TP 10 |
---|
79 | \-s |
---|
80 | If transmitting, source a data pattern to network; |
---|
81 | if receiving, sink (discard) the data. |
---|
82 | Without the \f3\-s\f1 option, the default is to transmit data from |
---|
83 | .I stdin |
---|
84 | or print the received data to |
---|
85 | .IR stdout . |
---|
86 | .TP 10 |
---|
87 | \-l \fIlength\fP |
---|
88 | Length of buffers in bytes (default 8192). |
---|
89 | For UDP, this value is the number of data bytes in each packet. |
---|
90 | The system limits the maximum UDP packet length. This limit can be |
---|
91 | changed with the \f3\-b\f1 option. |
---|
92 | .TP 10 |
---|
93 | \-b \fIsize\fP |
---|
94 | Set size of socket buffer. The default varies from system to system. |
---|
95 | This parameter affects the maximum UDP packet length. |
---|
96 | It may not be possible to set this parameter on some systems |
---|
97 | (for example, 4.2BSD). |
---|
98 | .TP 10 |
---|
99 | \-n \fInumbufs\fP |
---|
100 | Number of source buffers transmitted (default 2048). |
---|
101 | .TP 10 |
---|
102 | \-p \fIport\fP |
---|
103 | Port number to send to or listen on (default 2000). |
---|
104 | On some systems, this port may be allocated to another network daemon. |
---|
105 | .TP 10 |
---|
106 | \-D |
---|
107 | If transmitting using TCP, do not buffer data when sending |
---|
108 | (sets the TCP_NODELAY socket option). |
---|
109 | It may not be possible to set this parameter on some systems |
---|
110 | (for example, 4.2BSD). |
---|
111 | .TP 10 |
---|
112 | \-B |
---|
113 | When receiving data, output only full blocks, |
---|
114 | using the block size specified by \f3\-l\f1. |
---|
115 | This option is useful for programs, such as \f2tar\f1(1), that require |
---|
116 | complete blocks. |
---|
117 | .TP 10 |
---|
118 | \-A \fIalign\fP |
---|
119 | Align the start of buffers to this modulus (default 16384). |
---|
120 | .TP 10 |
---|
121 | \-O \fIoffset\fP |
---|
122 | Align the start of buffers to this offset (default 0). |
---|
123 | For example, ``\-A8192 \-O1'' causes buffers to start at the second byte |
---|
124 | of an 8192-byte page. |
---|
125 | .TP 10 |
---|
126 | \-f \fIformat\fP |
---|
127 | Specify, using one of the following characters, |
---|
128 | the format of the throughput rates as |
---|
129 | kilobits/sec ('k'), kilobytes/sec ('K'), |
---|
130 | megabits/sec ('m'), megabytes/sec ('M'), |
---|
131 | gigabits/sec ('g'), or gigabytes/sec ('G'). |
---|
132 | The default is 'K'. |
---|
133 | .TP 10 |
---|
134 | \-T |
---|
135 | ``Touch'' the data as they are read in order to measure cache effects. |
---|
136 | .TP 10 |
---|
137 | \-v |
---|
138 | Verbose: print more statistics. |
---|
139 | .TP 10 |
---|
140 | \-d |
---|
141 | Debug: set the SO_DEBUG socket option. |
---|
142 | .SH SEE ALSO |
---|
143 | ping(1M), traceroute(1M), netsnoop(1M) |
---|
144 | |
---|