xref: /aosp_15_r20/external/iperf3/docs/invoking.rst (revision 7ab6e6ace082586527a400463bc693a412a40341)
1*7ab6e6acSAndroid Build Coastguard WorkerInvoking iperf3
2*7ab6e6acSAndroid Build Coastguard Worker===============
3*7ab6e6acSAndroid Build Coastguard Worker
4*7ab6e6acSAndroid Build Coastguard Workeriperf3 includes a manual page listing all of the command-line options.
5*7ab6e6acSAndroid Build Coastguard WorkerThe manual page is the most up-to-date reference to the various flags and parameters.
6*7ab6e6acSAndroid Build Coastguard Worker
7*7ab6e6acSAndroid Build Coastguard WorkerFor sample command line usage, see:
8*7ab6e6acSAndroid Build Coastguard Worker
9*7ab6e6acSAndroid Build Coastguard Workerhttps://fasterdata.es.net/performance-testing/network-troubleshooting-tools/iperf/
10*7ab6e6acSAndroid Build Coastguard Worker
11*7ab6e6acSAndroid Build Coastguard WorkerUsing the default options, iperf3 is meant to show typical well
12*7ab6e6acSAndroid Build Coastguard Workerdesigned application performance.  "Typical well designed application"
13*7ab6e6acSAndroid Build Coastguard Workermeans avoiding artificial enhancements that work only for testing
14*7ab6e6acSAndroid Build Coastguard Worker(such as ``splice()``-ing the data to ``/dev/null``).  iperf3 does
15*7ab6e6acSAndroid Build Coastguard Workeralso have flags for "extreme best case" optimizations but they must be
16*7ab6e6acSAndroid Build Coastguard Workerexplicitly activated.  These flags include the ``-Z`` (``--zerocopy``)
17*7ab6e6acSAndroid Build Coastguard Workerand ``-A`` (``--affinity``) options.
18*7ab6e6acSAndroid Build Coastguard Worker
19*7ab6e6acSAndroid Build Coastguard Workeriperf3 Manual Page
20*7ab6e6acSAndroid Build Coastguard Worker------------------
21*7ab6e6acSAndroid Build Coastguard Worker
22*7ab6e6acSAndroid Build Coastguard WorkerThis section contains a plaintext rendering of the iperf3 manual page.
23*7ab6e6acSAndroid Build Coastguard WorkerIt is presented here only for convenience; the text here might not
24*7ab6e6acSAndroid Build Coastguard Workercorrespond to the current version of iperf3.  The authoritative iperf3
25*7ab6e6acSAndroid Build Coastguard Workermanual page is included in the source tree and installed along with
26*7ab6e6acSAndroid Build Coastguard Workerthe executable.
27*7ab6e6acSAndroid Build Coastguard Worker
28*7ab6e6acSAndroid Build Coastguard Worker::
29*7ab6e6acSAndroid Build Coastguard Worker
30*7ab6e6acSAndroid Build Coastguard Worker   IPERF3(1)                        User Manuals                        IPERF3(1)
31*7ab6e6acSAndroid Build Coastguard Worker
32*7ab6e6acSAndroid Build Coastguard Worker
33*7ab6e6acSAndroid Build Coastguard Worker
34*7ab6e6acSAndroid Build Coastguard Worker   NAME
35*7ab6e6acSAndroid Build Coastguard Worker          iperf3 - perform network throughput tests
36*7ab6e6acSAndroid Build Coastguard Worker
37*7ab6e6acSAndroid Build Coastguard Worker   SYNOPSIS
38*7ab6e6acSAndroid Build Coastguard Worker          iperf3 -s [ options ]
39*7ab6e6acSAndroid Build Coastguard Worker          iperf3 -c server [ options ]
40*7ab6e6acSAndroid Build Coastguard Worker
41*7ab6e6acSAndroid Build Coastguard Worker
42*7ab6e6acSAndroid Build Coastguard Worker   DESCRIPTION
43*7ab6e6acSAndroid Build Coastguard Worker          iperf3  is  a  tool for performing network throughput measurements.  It
44*7ab6e6acSAndroid Build Coastguard Worker          can test TCP, UDP, or SCTP throughput.  To perform an iperf3  test  the
45*7ab6e6acSAndroid Build Coastguard Worker          user must establish both a server and a client.
46*7ab6e6acSAndroid Build Coastguard Worker
47*7ab6e6acSAndroid Build Coastguard Worker          The  iperf3  executable  contains both client and server functionality.
48*7ab6e6acSAndroid Build Coastguard Worker          An iperf3 server can be started using either of the -s or --server com-
49*7ab6e6acSAndroid Build Coastguard Worker          mand-line parameters, for example:
50*7ab6e6acSAndroid Build Coastguard Worker
51*7ab6e6acSAndroid Build Coastguard Worker                 iperf3 -s
52*7ab6e6acSAndroid Build Coastguard Worker
53*7ab6e6acSAndroid Build Coastguard Worker                 iperf3 --server
54*7ab6e6acSAndroid Build Coastguard Worker
55*7ab6e6acSAndroid Build Coastguard Worker          Note  that  many  iperf3  parameters  have  both  short  (-s)  and long
56*7ab6e6acSAndroid Build Coastguard Worker          (--server) forms.  In this section we will generally use the short form
57*7ab6e6acSAndroid Build Coastguard Worker          of  command-line  flags,  unless only the long form of a flag is avail-
58*7ab6e6acSAndroid Build Coastguard Worker          able.
59*7ab6e6acSAndroid Build Coastguard Worker
60*7ab6e6acSAndroid Build Coastguard Worker          By default, the iperf3 server listens on TCP port 5201 for  connections
61*7ab6e6acSAndroid Build Coastguard Worker          from  an iperf3 client.  A custom port can be specified by using the -p
62*7ab6e6acSAndroid Build Coastguard Worker          flag, for example:
63*7ab6e6acSAndroid Build Coastguard Worker
64*7ab6e6acSAndroid Build Coastguard Worker                 iperf3 -s -p 5002
65*7ab6e6acSAndroid Build Coastguard Worker
66*7ab6e6acSAndroid Build Coastguard Worker          After the server is started, it will listen for connections from iperf3
67*7ab6e6acSAndroid Build Coastguard Worker          clients  (in  other words, the iperf3 program run in client mode).  The
68*7ab6e6acSAndroid Build Coastguard Worker          client mode can be started using the -c command-line option, which also
69*7ab6e6acSAndroid Build Coastguard Worker          requires a host to which iperf3 should connect.  The host can by speci-
70*7ab6e6acSAndroid Build Coastguard Worker          fied by hostname, IPv4 literal, or IPv6 literal:
71*7ab6e6acSAndroid Build Coastguard Worker
72*7ab6e6acSAndroid Build Coastguard Worker                 iperf3 -c iperf3.example.com
73*7ab6e6acSAndroid Build Coastguard Worker
74*7ab6e6acSAndroid Build Coastguard Worker                 iperf3 -c 192.0.2.1
75*7ab6e6acSAndroid Build Coastguard Worker
76*7ab6e6acSAndroid Build Coastguard Worker                 iperf3 -c 2001:db8::1
77*7ab6e6acSAndroid Build Coastguard Worker
78*7ab6e6acSAndroid Build Coastguard Worker          If the iperf3 server is running on a non-default TCP  port,  that  port
79*7ab6e6acSAndroid Build Coastguard Worker          number needs to be specified on the client as well:
80*7ab6e6acSAndroid Build Coastguard Worker
81*7ab6e6acSAndroid Build Coastguard Worker                 iperf3 -c iperf3.example.com -p 5002
82*7ab6e6acSAndroid Build Coastguard Worker
83*7ab6e6acSAndroid Build Coastguard Worker          The initial TCP connection is used to exchange test parameters, control
84*7ab6e6acSAndroid Build Coastguard Worker          the start and end of the test, and to exchange test results.   This  is
85*7ab6e6acSAndroid Build Coastguard Worker          sometimes  referred  to  as  the "control connection".  The actual test
86*7ab6e6acSAndroid Build Coastguard Worker          data is sent over a separate TCP connection, as a separate flow of  UDP
87*7ab6e6acSAndroid Build Coastguard Worker          packets, or as an independent SCTP connection, depending on what proto-
88*7ab6e6acSAndroid Build Coastguard Worker          col was specified by the client.
89*7ab6e6acSAndroid Build Coastguard Worker
90*7ab6e6acSAndroid Build Coastguard Worker          Normally, the test data is sent from the client to the server, and mea-
91*7ab6e6acSAndroid Build Coastguard Worker          sures  the  upload  speed  of the client.  Measuring the download speed
92*7ab6e6acSAndroid Build Coastguard Worker          from the server can be done by specifying the -R flag  on  the  client.
93*7ab6e6acSAndroid Build Coastguard Worker          This causes data to be sent from the server to the client.
94*7ab6e6acSAndroid Build Coastguard Worker
95*7ab6e6acSAndroid Build Coastguard Worker                 iperf3 -c iperf3.example.com -p 5202 -R
96*7ab6e6acSAndroid Build Coastguard Worker
97*7ab6e6acSAndroid Build Coastguard Worker          Results  are displayed on both the client and server.  There will be at
98*7ab6e6acSAndroid Build Coastguard Worker          least one line of output per measurement interval (by  default  a  mea-
99*7ab6e6acSAndroid Build Coastguard Worker          surement  interval lasts for one second, but this can be changed by the
100*7ab6e6acSAndroid Build Coastguard Worker          -i option).  Each line of output includes (at least) the time since the
101*7ab6e6acSAndroid Build Coastguard Worker          start  of the test, amount of data transferred during the interval, and
102*7ab6e6acSAndroid Build Coastguard Worker          the average bitrate over that interval.  Note that the values for  each
103*7ab6e6acSAndroid Build Coastguard Worker          measurement  interval  are taken from the point of view of the endpoint
104*7ab6e6acSAndroid Build Coastguard Worker          process emitting that output (in other words, the output on the  client
105*7ab6e6acSAndroid Build Coastguard Worker          shows the measurement interval data for the client.
106*7ab6e6acSAndroid Build Coastguard Worker
107*7ab6e6acSAndroid Build Coastguard Worker          At  the  end of the test is a set of statistics that shows (at least as
108*7ab6e6acSAndroid Build Coastguard Worker          much as possible) a summary of the test as seen by both the sender  and
109*7ab6e6acSAndroid Build Coastguard Worker          the  receiver,  with  lines tagged accordingly.  Recall that by default
110*7ab6e6acSAndroid Build Coastguard Worker          the client is the sender and the server is the  receiver,  although  as
111*7ab6e6acSAndroid Build Coastguard Worker          indicated above, use of the -R flag will reverse these roles.
112*7ab6e6acSAndroid Build Coastguard Worker
113*7ab6e6acSAndroid Build Coastguard Worker          The  client  can be made to retrieve the server-side output for a given
114*7ab6e6acSAndroid Build Coastguard Worker          test by specifying the --get-server-output flag.
115*7ab6e6acSAndroid Build Coastguard Worker
116*7ab6e6acSAndroid Build Coastguard Worker          Either the client or the server can produce its output in a JSON struc-
117*7ab6e6acSAndroid Build Coastguard Worker          ture,  useful for integration with other programs, by passing it the -J
118*7ab6e6acSAndroid Build Coastguard Worker          flag.  Because the contents of the JSON structure  are  only  competely
119*7ab6e6acSAndroid Build Coastguard Worker          known after the test has finished, no JSON output will be emitted until
120*7ab6e6acSAndroid Build Coastguard Worker          the end of the test.
121*7ab6e6acSAndroid Build Coastguard Worker
122*7ab6e6acSAndroid Build Coastguard Worker          iperf3 has a (overly) large set of command-line  options  that  can  be
123*7ab6e6acSAndroid Build Coastguard Worker          used  to  set the parameters of a test.  They are given in the "GENERAL
124*7ab6e6acSAndroid Build Coastguard Worker          OPTIONS" section of the manual page below, as  well  as  summarized  in
125*7ab6e6acSAndroid Build Coastguard Worker          iperf3's help output, which can be viewed by running iperf3 with the -h
126*7ab6e6acSAndroid Build Coastguard Worker          flag.
127*7ab6e6acSAndroid Build Coastguard Worker
128*7ab6e6acSAndroid Build Coastguard Worker   GENERAL OPTIONS
129*7ab6e6acSAndroid Build Coastguard Worker          -p, --port n
130*7ab6e6acSAndroid Build Coastguard Worker                 set server port to listen on/connect to to n (default 5201)
131*7ab6e6acSAndroid Build Coastguard Worker
132*7ab6e6acSAndroid Build Coastguard Worker          -f, --format
133*7ab6e6acSAndroid Build Coastguard Worker                 [kmgtKMGT]   format to report: Kbits/Mbits/Gbits/Tbits
134*7ab6e6acSAndroid Build Coastguard Worker
135*7ab6e6acSAndroid Build Coastguard Worker          -i, --interval n
136*7ab6e6acSAndroid Build Coastguard Worker                 pause n seconds between periodic throughput reports; default  is
137*7ab6e6acSAndroid Build Coastguard Worker                 1, use 0 to disable
138*7ab6e6acSAndroid Build Coastguard Worker
139*7ab6e6acSAndroid Build Coastguard Worker          -F, --file name
140*7ab6e6acSAndroid Build Coastguard Worker                 Use  a  file  as  the  source  (on  the  sender) or sink (on the
141*7ab6e6acSAndroid Build Coastguard Worker                 receiver) of data, rather than just generating  random  data  or
142*7ab6e6acSAndroid Build Coastguard Worker                 throwing  it  away.  This feature is used for finding whether or
143*7ab6e6acSAndroid Build Coastguard Worker                 not the storage subsystem is the bottleneck for file  transfers.
144*7ab6e6acSAndroid Build Coastguard Worker                 It  does not turn iperf3 into a file transfer tool.  The length,
145*7ab6e6acSAndroid Build Coastguard Worker                 attributes, and in some cases contents of the received file  may
146*7ab6e6acSAndroid Build Coastguard Worker                 not match those of the original file.
147*7ab6e6acSAndroid Build Coastguard Worker
148*7ab6e6acSAndroid Build Coastguard Worker          -A, --affinity n/n,m
149*7ab6e6acSAndroid Build Coastguard Worker                 Set  the  CPU affinity, if possible (Linux, FreeBSD, and Windows
150*7ab6e6acSAndroid Build Coastguard Worker                 only).  On both the client and server  you  can  set  the  local
151*7ab6e6acSAndroid Build Coastguard Worker                 affinity  by using the n form of this argument (where n is a CPU
152*7ab6e6acSAndroid Build Coastguard Worker                 number).  In addition, on the client side you can  override  the
153*7ab6e6acSAndroid Build Coastguard Worker                 server's  affinity for just that one test, using the n,m form of
154*7ab6e6acSAndroid Build Coastguard Worker                 argument.  Note that when using this  feature,  a  process  will
155*7ab6e6acSAndroid Build Coastguard Worker                 only  be  bound  to a single CPU (as opposed to a set containing
156*7ab6e6acSAndroid Build Coastguard Worker                 potentialy multiple CPUs).
157*7ab6e6acSAndroid Build Coastguard Worker
158*7ab6e6acSAndroid Build Coastguard Worker          -B, --bind host
159*7ab6e6acSAndroid Build Coastguard Worker                 bind to the specific interface associated with address host.  If
160*7ab6e6acSAndroid Build Coastguard Worker                 the  host  has multiple interfaces, it will use the first inter-
161*7ab6e6acSAndroid Build Coastguard Worker                 face by default.
162*7ab6e6acSAndroid Build Coastguard Worker
163*7ab6e6acSAndroid Build Coastguard Worker          -V, --verbose
164*7ab6e6acSAndroid Build Coastguard Worker                 give more detailed output
165*7ab6e6acSAndroid Build Coastguard Worker
166*7ab6e6acSAndroid Build Coastguard Worker          -J, --json
167*7ab6e6acSAndroid Build Coastguard Worker                 output in JSON format
168*7ab6e6acSAndroid Build Coastguard Worker
169*7ab6e6acSAndroid Build Coastguard Worker          --logfile file
170*7ab6e6acSAndroid Build Coastguard Worker                 send output to a log file.
171*7ab6e6acSAndroid Build Coastguard Worker
172*7ab6e6acSAndroid Build Coastguard Worker          --forceflush
173*7ab6e6acSAndroid Build Coastguard Worker                 force flushing output at every interval.  Used to avoid  buffer-
174*7ab6e6acSAndroid Build Coastguard Worker                 ing when sending output to pipe.
175*7ab6e6acSAndroid Build Coastguard Worker
176*7ab6e6acSAndroid Build Coastguard Worker          -d, --debug
177*7ab6e6acSAndroid Build Coastguard Worker                 emit  debugging  output.  Primarily (perhaps exclusively) of use
178*7ab6e6acSAndroid Build Coastguard Worker                 to developers.
179*7ab6e6acSAndroid Build Coastguard Worker
180*7ab6e6acSAndroid Build Coastguard Worker          -v, --version
181*7ab6e6acSAndroid Build Coastguard Worker                 show version information and quit
182*7ab6e6acSAndroid Build Coastguard Worker
183*7ab6e6acSAndroid Build Coastguard Worker          -h, --help
184*7ab6e6acSAndroid Build Coastguard Worker                 show a help synopsis
185*7ab6e6acSAndroid Build Coastguard Worker
186*7ab6e6acSAndroid Build Coastguard Worker
187*7ab6e6acSAndroid Build Coastguard Worker   SERVER SPECIFIC OPTIONS
188*7ab6e6acSAndroid Build Coastguard Worker          -s, --server
189*7ab6e6acSAndroid Build Coastguard Worker                 run in server mode
190*7ab6e6acSAndroid Build Coastguard Worker
191*7ab6e6acSAndroid Build Coastguard Worker          -D, --daemon
192*7ab6e6acSAndroid Build Coastguard Worker                 run the server in background as a daemon
193*7ab6e6acSAndroid Build Coastguard Worker
194*7ab6e6acSAndroid Build Coastguard Worker          -I, --pidfile file
195*7ab6e6acSAndroid Build Coastguard Worker                 write a file with the process ID, most useful when running as  a
196*7ab6e6acSAndroid Build Coastguard Worker                 daemon.
197*7ab6e6acSAndroid Build Coastguard Worker
198*7ab6e6acSAndroid Build Coastguard Worker          -1, --one-off
199*7ab6e6acSAndroid Build Coastguard Worker                 handle one client connection, then exit.
200*7ab6e6acSAndroid Build Coastguard Worker
201*7ab6e6acSAndroid Build Coastguard Worker          --rsa-private-key-path file
202*7ab6e6acSAndroid Build Coastguard Worker                 path  to  the  RSA  private key (not password-protected) used to
203*7ab6e6acSAndroid Build Coastguard Worker                 decrypt authentication credentials from  the  client  (if  built
204*7ab6e6acSAndroid Build Coastguard Worker                 with OpenSSL support).
205*7ab6e6acSAndroid Build Coastguard Worker
206*7ab6e6acSAndroid Build Coastguard Worker          --authorized-users-path file
207*7ab6e6acSAndroid Build Coastguard Worker                 path  to the configuration file containing authorized users cre-
208*7ab6e6acSAndroid Build Coastguard Worker                 dentials to run iperf tests (if  built  with  OpenSSL  support).
209*7ab6e6acSAndroid Build Coastguard Worker                 The  file  is  a  comma separated list of usernames and password
210*7ab6e6acSAndroid Build Coastguard Worker                 hashes; more information on the structure of  the  file  can  be
211*7ab6e6acSAndroid Build Coastguard Worker                 found in the EXAMPLES section.
212*7ab6e6acSAndroid Build Coastguard Worker
213*7ab6e6acSAndroid Build Coastguard Worker   CLIENT SPECIFIC OPTIONS
214*7ab6e6acSAndroid Build Coastguard Worker          -c, --client host
215*7ab6e6acSAndroid Build Coastguard Worker                 run  in  client  mode,  connecting  to the specified server.  By
216*7ab6e6acSAndroid Build Coastguard Worker                 default, a test consists of sending data from the client to  the
217*7ab6e6acSAndroid Build Coastguard Worker                 server, unless the -R flag is specified.
218*7ab6e6acSAndroid Build Coastguard Worker
219*7ab6e6acSAndroid Build Coastguard Worker          --sctp use SCTP rather than TCP (FreeBSD and Linux)
220*7ab6e6acSAndroid Build Coastguard Worker
221*7ab6e6acSAndroid Build Coastguard Worker          -u, --udp
222*7ab6e6acSAndroid Build Coastguard Worker                 use UDP rather than TCP
223*7ab6e6acSAndroid Build Coastguard Worker
224*7ab6e6acSAndroid Build Coastguard Worker          --connect-timeout n
225*7ab6e6acSAndroid Build Coastguard Worker                 set  timeout  for establishing the initial control connection to
226*7ab6e6acSAndroid Build Coastguard Worker                 the server, in milliseconds.  The default behavior is the  oper-
227*7ab6e6acSAndroid Build Coastguard Worker                 ating  system's  timeout for TCP connection establishment.  Pro-
228*7ab6e6acSAndroid Build Coastguard Worker                 viding a shorter value may speed up detection of a  down  iperf3
229*7ab6e6acSAndroid Build Coastguard Worker                 server.
230*7ab6e6acSAndroid Build Coastguard Worker
231*7ab6e6acSAndroid Build Coastguard Worker          -b, --bitrate n[KM]
232*7ab6e6acSAndroid Build Coastguard Worker                 set  target  bitrate  to n bits/sec (default 1 Mbit/sec for UDP,
233*7ab6e6acSAndroid Build Coastguard Worker                 unlimited for TCP/SCTP).  If  there  are  multiple  streams  (-P
234*7ab6e6acSAndroid Build Coastguard Worker                 flag),  the  throughput  limit  is  applied  separately  to each
235*7ab6e6acSAndroid Build Coastguard Worker                 stream.  You can also add a '/' and  a  number  to  the  bitrate
236*7ab6e6acSAndroid Build Coastguard Worker                 specifier.  This is called "burst mode".  It will send the given
237*7ab6e6acSAndroid Build Coastguard Worker                 number of packets without  pausing,  even  if  that  temporarily
238*7ab6e6acSAndroid Build Coastguard Worker                 exceeds  the  specified  throughput  limit.   Setting the target
239*7ab6e6acSAndroid Build Coastguard Worker                 bitrate to 0 will disable bitrate  limits  (particularly  useful
240*7ab6e6acSAndroid Build Coastguard Worker                 for UDP tests).  This throughput limit is implemented internally
241*7ab6e6acSAndroid Build Coastguard Worker                 inside iperf3, and is available on all platforms.  Compare  with
242*7ab6e6acSAndroid Build Coastguard Worker                 the  --fq-rate flag.  This option replaces the --bandwidth flag,
243*7ab6e6acSAndroid Build Coastguard Worker                 which is now deprecated but (at least for now) still accepted.
244*7ab6e6acSAndroid Build Coastguard Worker
245*7ab6e6acSAndroid Build Coastguard Worker          --pacing-timer n[KMG]
246*7ab6e6acSAndroid Build Coastguard Worker                 set  pacing  timer  interval  in  microseconds   (default   1000
247*7ab6e6acSAndroid Build Coastguard Worker                 microseconds,  or 1 ms).  This controls iperf3's internal pacing
248*7ab6e6acSAndroid Build Coastguard Worker                 timer for the -b/--bitrate  option.   The  timer  fires  at  the
249*7ab6e6acSAndroid Build Coastguard Worker                 interval  set  by  this parameter.  Smaller values of the pacing
250*7ab6e6acSAndroid Build Coastguard Worker                 timer parameter smooth out the traffic emitted  by  iperf3,  but
251*7ab6e6acSAndroid Build Coastguard Worker                 potentially  at  the  cost  of  performance due to more frequent
252*7ab6e6acSAndroid Build Coastguard Worker                 timer processing.
253*7ab6e6acSAndroid Build Coastguard Worker
254*7ab6e6acSAndroid Build Coastguard Worker          --fq-rate n[KM]
255*7ab6e6acSAndroid Build Coastguard Worker                 Set a rate to be used with fair-queueing based socket-level pac-
256*7ab6e6acSAndroid Build Coastguard Worker                 ing,  in bits per second.  This pacing (if specified) will be in
257*7ab6e6acSAndroid Build Coastguard Worker                 addition to any pacing due to iperf3's internal throughput  pac-
258*7ab6e6acSAndroid Build Coastguard Worker                 ing  (-b/--bitrate flag), and both can be specified for the same
259*7ab6e6acSAndroid Build Coastguard Worker                 test.  Only available on platforms  supporting  the  SO_MAX_PAC-
260*7ab6e6acSAndroid Build Coastguard Worker                 ING_RATE  socket  option (currently only Linux).  The default is
261*7ab6e6acSAndroid Build Coastguard Worker                 no fair-queueing based pacing.
262*7ab6e6acSAndroid Build Coastguard Worker
263*7ab6e6acSAndroid Build Coastguard Worker          --no-fq-socket-pacing
264*7ab6e6acSAndroid Build Coastguard Worker                 This option is deprecated and will be removed.  It is equivalent
265*7ab6e6acSAndroid Build Coastguard Worker                 to specifying --fq-rate=0.
266*7ab6e6acSAndroid Build Coastguard Worker
267*7ab6e6acSAndroid Build Coastguard Worker          -t, --time n
268*7ab6e6acSAndroid Build Coastguard Worker                 time in seconds to transmit for (default 10 secs)
269*7ab6e6acSAndroid Build Coastguard Worker
270*7ab6e6acSAndroid Build Coastguard Worker          -n, --bytes n[KM]
271*7ab6e6acSAndroid Build Coastguard Worker                 number of bytes to transmit (instead of -t)
272*7ab6e6acSAndroid Build Coastguard Worker
273*7ab6e6acSAndroid Build Coastguard Worker          -k, --blockcount n[KM]
274*7ab6e6acSAndroid Build Coastguard Worker                 number of blocks (packets) to transmit (instead of -t or -n)
275*7ab6e6acSAndroid Build Coastguard Worker
276*7ab6e6acSAndroid Build Coastguard Worker          -l, --length n[KM]
277*7ab6e6acSAndroid Build Coastguard Worker                 length  of  buffer to read or write.  For TCP tests, the default
278*7ab6e6acSAndroid Build Coastguard Worker                 value is 128KB.  In the case of UDP, iperf3 tries to dynamically
279*7ab6e6acSAndroid Build Coastguard Worker                 determine  a  reasonable  sending size based on the path MTU; if
280*7ab6e6acSAndroid Build Coastguard Worker                 that cannot be determined it uses 1460 bytes as a sending  size.
281*7ab6e6acSAndroid Build Coastguard Worker                 For SCTP tests, the default size is 64KB.
282*7ab6e6acSAndroid Build Coastguard Worker
283*7ab6e6acSAndroid Build Coastguard Worker          --cport port
284*7ab6e6acSAndroid Build Coastguard Worker                 bind  data  streams  to  a specific client port (for TCP and UDP
285*7ab6e6acSAndroid Build Coastguard Worker                 only, default is to use an ephemeral port)
286*7ab6e6acSAndroid Build Coastguard Worker
287*7ab6e6acSAndroid Build Coastguard Worker          -P, --parallel n
288*7ab6e6acSAndroid Build Coastguard Worker                 number of parallel client streams to run. Note  that  iperf3  is
289*7ab6e6acSAndroid Build Coastguard Worker                 single  threaded,  so  if you are CPU bound, this will not yield
290*7ab6e6acSAndroid Build Coastguard Worker                 higher throughput.
291*7ab6e6acSAndroid Build Coastguard Worker
292*7ab6e6acSAndroid Build Coastguard Worker          -R, --reverse
293*7ab6e6acSAndroid Build Coastguard Worker                 reverse the direction of a test, so that the server  sends  data
294*7ab6e6acSAndroid Build Coastguard Worker                 to the client
295*7ab6e6acSAndroid Build Coastguard Worker
296*7ab6e6acSAndroid Build Coastguard Worker          --bidir
297*7ab6e6acSAndroid Build Coastguard Worker                 bidirectional mode, server and client send and receive data.
298*7ab6e6acSAndroid Build Coastguard Worker
299*7ab6e6acSAndroid Build Coastguard Worker          -w, --window n[KM]
300*7ab6e6acSAndroid Build Coastguard Worker                 window  size  / socket buffer size (this gets sent to the server
301*7ab6e6acSAndroid Build Coastguard Worker                 and used on that side too)
302*7ab6e6acSAndroid Build Coastguard Worker
303*7ab6e6acSAndroid Build Coastguard Worker          -M, --set-mss n
304*7ab6e6acSAndroid Build Coastguard Worker                 set TCP/SCTP maximum segment size (MTU - 40 bytes)
305*7ab6e6acSAndroid Build Coastguard Worker
306*7ab6e6acSAndroid Build Coastguard Worker          -N, --no-delay
307*7ab6e6acSAndroid Build Coastguard Worker                 set TCP/SCTP no delay, disabling Nagle's Algorithm
308*7ab6e6acSAndroid Build Coastguard Worker
309*7ab6e6acSAndroid Build Coastguard Worker          -4, --version4
310*7ab6e6acSAndroid Build Coastguard Worker                 only use IPv4
311*7ab6e6acSAndroid Build Coastguard Worker
312*7ab6e6acSAndroid Build Coastguard Worker          -6, --version6
313*7ab6e6acSAndroid Build Coastguard Worker                 only use IPv6
314*7ab6e6acSAndroid Build Coastguard Worker
315*7ab6e6acSAndroid Build Coastguard Worker          -S, --tos n
316*7ab6e6acSAndroid Build Coastguard Worker                 set the IP type of service. The usual prefixes for octal and hex
317*7ab6e6acSAndroid Build Coastguard Worker                 can be used, i.e. 52, 064 and 0x34 all specify the same value.
318*7ab6e6acSAndroid Build Coastguard Worker
319*7ab6e6acSAndroid Build Coastguard Worker          --dscp dscp
320*7ab6e6acSAndroid Build Coastguard Worker                 set  the  IP  DSCP  bits.   Both numeric and symbolic values are
321*7ab6e6acSAndroid Build Coastguard Worker                 accepted. Numeric values can be specified in decimal, octal  and
322*7ab6e6acSAndroid Build Coastguard Worker                 hex (see --tos above).
323*7ab6e6acSAndroid Build Coastguard Worker
324*7ab6e6acSAndroid Build Coastguard Worker          -L, --flowlabel n
325*7ab6e6acSAndroid Build Coastguard Worker                 set the IPv6 flow label (currently only supported on Linux)
326*7ab6e6acSAndroid Build Coastguard Worker
327*7ab6e6acSAndroid Build Coastguard Worker          -X, --xbind name
328*7ab6e6acSAndroid Build Coastguard Worker                 Bind  SCTP  associations  to  a  specific  subset of links using
329*7ab6e6acSAndroid Build Coastguard Worker                 sctp_bindx(3).  The --B flag will be ignored  if  this  flag  is
330*7ab6e6acSAndroid Build Coastguard Worker                 specified.  Normally SCTP will include the protocol addresses of
331*7ab6e6acSAndroid Build Coastguard Worker                 all active links on the local host when setting up  an  associa-
332*7ab6e6acSAndroid Build Coastguard Worker                 tion.  Specifying at least one --X name will disable this behav-
333*7ab6e6acSAndroid Build Coastguard Worker                 iour.  This flag must be specified for each link to be  included
334*7ab6e6acSAndroid Build Coastguard Worker                 in  the association, and is supported for both iperf servers and
335*7ab6e6acSAndroid Build Coastguard Worker                 clients (the latter are supported by passing the first --X argu-
336*7ab6e6acSAndroid Build Coastguard Worker                 ment  to  bind(2)).  Hostnames are accepted as arguments and are
337*7ab6e6acSAndroid Build Coastguard Worker                 resolved using getaddrinfo(3).  If the  --4  or  --6  flags  are
338*7ab6e6acSAndroid Build Coastguard Worker                 specified,  names  which  do not resolve to addresses within the
339*7ab6e6acSAndroid Build Coastguard Worker                 specified protocol family will be ignored.
340*7ab6e6acSAndroid Build Coastguard Worker
341*7ab6e6acSAndroid Build Coastguard Worker          --nstreams n
342*7ab6e6acSAndroid Build Coastguard Worker                 Set number of SCTP streams.
343*7ab6e6acSAndroid Build Coastguard Worker
344*7ab6e6acSAndroid Build Coastguard Worker          -Z, --zerocopy
345*7ab6e6acSAndroid Build Coastguard Worker                 Use a "zero copy" method of sending data, such  as  sendfile(2),
346*7ab6e6acSAndroid Build Coastguard Worker                 instead of the usual write(2).
347*7ab6e6acSAndroid Build Coastguard Worker
348*7ab6e6acSAndroid Build Coastguard Worker          -O, --omit n
349*7ab6e6acSAndroid Build Coastguard Worker                 Omit the first n seconds of the test, to skip past the TCP slow-
350*7ab6e6acSAndroid Build Coastguard Worker                 start period.
351*7ab6e6acSAndroid Build Coastguard Worker
352*7ab6e6acSAndroid Build Coastguard Worker          -T, --title str
353*7ab6e6acSAndroid Build Coastguard Worker                 Prefix every output line with this string.
354*7ab6e6acSAndroid Build Coastguard Worker
355*7ab6e6acSAndroid Build Coastguard Worker          --extra-data str
356*7ab6e6acSAndroid Build Coastguard Worker                 Specify an extra data string field to be included in  JSON  out-
357*7ab6e6acSAndroid Build Coastguard Worker                 put.
358*7ab6e6acSAndroid Build Coastguard Worker
359*7ab6e6acSAndroid Build Coastguard Worker          -C, --congestion algo
360*7ab6e6acSAndroid Build Coastguard Worker                 Set  the  congestion control algorithm (Linux and FreeBSD only).
361*7ab6e6acSAndroid Build Coastguard Worker                 An older --linux-congestion synonym for this  flag  is  accepted
362*7ab6e6acSAndroid Build Coastguard Worker                 but is deprecated.
363*7ab6e6acSAndroid Build Coastguard Worker
364*7ab6e6acSAndroid Build Coastguard Worker          --get-server-output
365*7ab6e6acSAndroid Build Coastguard Worker                 Get the output from the server.  The output format is determined
366*7ab6e6acSAndroid Build Coastguard Worker                 by the server (in particular, if the server was invoked with the
367*7ab6e6acSAndroid Build Coastguard Worker                 --json  flag,  the  output  will be in JSON format, otherwise it
368*7ab6e6acSAndroid Build Coastguard Worker                 will be in human-readable format).  If the client  is  run  with
369*7ab6e6acSAndroid Build Coastguard Worker                 --json,  the  server output is included in a JSON object; other-
370*7ab6e6acSAndroid Build Coastguard Worker                 wise it is appended at the bottom of the human-readable  output.
371*7ab6e6acSAndroid Build Coastguard Worker
372*7ab6e6acSAndroid Build Coastguard Worker          --repeating-payload
373*7ab6e6acSAndroid Build Coastguard Worker                 Use  repeating pattern in payload, instead of random bytes.  The
374*7ab6e6acSAndroid Build Coastguard Worker                 same payload is used in iperf2  (ASCII  '0..9'  repeating).   It
375*7ab6e6acSAndroid Build Coastguard Worker                 might  help  to test and reveal problems in networking gear with
376*7ab6e6acSAndroid Build Coastguard Worker                 hardware compression (including some WiFi access points),  where
377*7ab6e6acSAndroid Build Coastguard Worker                 iperf2  and  iperf3  perform  differently, just based on payload
378*7ab6e6acSAndroid Build Coastguard Worker                 entropy.
379*7ab6e6acSAndroid Build Coastguard Worker
380*7ab6e6acSAndroid Build Coastguard Worker          --username username
381*7ab6e6acSAndroid Build Coastguard Worker                 username to use for authentication to the iperf server (if built
382*7ab6e6acSAndroid Build Coastguard Worker                 with OpenSSL support).  The password will be prompted for inter-
383*7ab6e6acSAndroid Build Coastguard Worker                 actively when the test is run.  Note, the password to use can
384*7ab6e6acSAndroid Build Coastguard Worker                 also be specified via the IPERF3_PASSWORD environment variable.
385*7ab6e6acSAndroid Build Coastguard Worker                 If this variable is present, the password prompt will be
386*7ab6e6acSAndroid Build Coastguard Worker                 skipped.
387*7ab6e6acSAndroid Build Coastguard Worker
388*7ab6e6acSAndroid Build Coastguard Worker          --rsa-public-key-path file
389*7ab6e6acSAndroid Build Coastguard Worker                 path to the RSA public key used to encrypt  authentication  cre-
390*7ab6e6acSAndroid Build Coastguard Worker                 dentials (if built with OpenSSL support)
391*7ab6e6acSAndroid Build Coastguard Worker
392*7ab6e6acSAndroid Build Coastguard Worker
393*7ab6e6acSAndroid Build Coastguard Worker   EXAMPLES
394*7ab6e6acSAndroid Build Coastguard Worker      Authentication - RSA Keypair
395*7ab6e6acSAndroid Build Coastguard Worker          The  authentication  feature  of iperf3 requires an RSA public keypair.
396*7ab6e6acSAndroid Build Coastguard Worker          The public key is used to encrypt the authentication  token  containing
397*7ab6e6acSAndroid Build Coastguard Worker          the  user  credentials,  while  the  private key is used to decrypt the
398*7ab6e6acSAndroid Build Coastguard Worker          authentication token.  An example of a set of  UNIX/Linux  commands  to
399*7ab6e6acSAndroid Build Coastguard Worker          generate correct keypair follows:
400*7ab6e6acSAndroid Build Coastguard Worker
401*7ab6e6acSAndroid Build Coastguard Worker               > openssl genrsa -des3 -out private.pem 2048
402*7ab6e6acSAndroid Build Coastguard Worker               > openssl rsa -in private.pem -outform PEM -pubout -out public.pem
403*7ab6e6acSAndroid Build Coastguard Worker               > openssl rsa -in private.pem -out private_not_protected.pem -out-
404*7ab6e6acSAndroid Build Coastguard Worker               form PEM
405*7ab6e6acSAndroid Build Coastguard Worker
406*7ab6e6acSAndroid Build Coastguard Worker          After these commands, the public key will be contained in the file pub-
407*7ab6e6acSAndroid Build Coastguard Worker          lic.pem and the  private  key  will  be  contained  in  the  file  pri-
408*7ab6e6acSAndroid Build Coastguard Worker          vate_not_protected.pem.
409*7ab6e6acSAndroid Build Coastguard Worker
410*7ab6e6acSAndroid Build Coastguard Worker      Authentication - Authorized users configuration file
411*7ab6e6acSAndroid Build Coastguard Worker          A  simple plaintext file must be provided to the iperf3 server in order
412*7ab6e6acSAndroid Build Coastguard Worker          to specify the authorized user credentials.  The file is a simple  list
413*7ab6e6acSAndroid Build Coastguard Worker          of  comma-separated  pairs  of  a username and a corresponding password
414*7ab6e6acSAndroid Build Coastguard Worker          hash.  The password hash is a SHA256 hash of the string  "{$user}$pass-
415*7ab6e6acSAndroid Build Coastguard Worker          word".   The file can also contain commented lines (starting with the #
416*7ab6e6acSAndroid Build Coastguard Worker          character).  An example of commands to generate the password hash on  a
417*7ab6e6acSAndroid Build Coastguard Worker          UNIX/Linux system is given below:
418*7ab6e6acSAndroid Build Coastguard Worker
419*7ab6e6acSAndroid Build Coastguard Worker               > S_USER=mario S_PASSWD=rossi
420*7ab6e6acSAndroid Build Coastguard Worker               > echo -n "{$S_USER}$S_PASSWD" | sha256sum | awk '{ print $1 }'
421*7ab6e6acSAndroid Build Coastguard Worker
422*7ab6e6acSAndroid Build Coastguard Worker          An example of a password file (with an entry corresponding to the above
423*7ab6e6acSAndroid Build Coastguard Worker          username and password) is given below:
424*7ab6e6acSAndroid Build Coastguard Worker               > cat credentials.csv
425*7ab6e6acSAndroid Build Coastguard Worker               # file format: username,sha256
426*7ab6e6acSAndroid Build Coastguard Worker               mario,bf7a49a846d44b454a5d11e7acfaf13d138bbe0b7483aa3e050879700572709b
427*7ab6e6acSAndroid Build Coastguard Worker
428*7ab6e6acSAndroid Build Coastguard Worker
429*7ab6e6acSAndroid Build Coastguard Worker
430*7ab6e6acSAndroid Build Coastguard Worker   AUTHORS
431*7ab6e6acSAndroid Build Coastguard Worker          A list of the contributors to iperf3 can be found within the documenta-
432*7ab6e6acSAndroid Build Coastguard Worker          tion located at https://software.es.net/iperf/dev.html#authors.
433*7ab6e6acSAndroid Build Coastguard Worker
434*7ab6e6acSAndroid Build Coastguard Worker
435*7ab6e6acSAndroid Build Coastguard Worker   SEE ALSO
436*7ab6e6acSAndroid Build Coastguard Worker          libiperf(3), https://software.es.net/iperf
437*7ab6e6acSAndroid Build Coastguard Worker
438*7ab6e6acSAndroid Build Coastguard Worker
439*7ab6e6acSAndroid Build Coastguard Worker
440*7ab6e6acSAndroid Build Coastguard Worker   ESnet                              June 2018                         IPERF3(1)
441*7ab6e6acSAndroid Build Coastguard Worker
442*7ab6e6acSAndroid Build Coastguard WorkerThe iperf3 manual page will typically be installed in manual
443*7ab6e6acSAndroid Build Coastguard Workersection 1.
444*7ab6e6acSAndroid Build Coastguard Worker
445