iperf3 -c server [ options ]
-p ", " --port " n" set server port to listen on/connect to to n (default 5201)
-f ", " --format " " [kmgtKMGT] format to report: Kbits/Mbits/Gbits/Tbits
-i ", " --interval " n" pause n seconds between periodic throughput reports; default is 1, use 0 to disable
-F ", " --file " name" Use a file as the source (on the sender) or sink (on the receiver) of data, rather than just generating random data or throwing it away. This feature is used for finding whether or not the storage subsystem is the bottleneck for file transfers. It does not turn iperf3 into a file transfer tool. The length, attributes, and in some cases contents of the received file may not match those of the original file.
-A ", " --affinity " n/n,m" Set the CPU affinity, if possible (Linux and FreeBSD only). On both the client and server you can set the local affinity by using the n form of this argument (where n is a CPU number). In addition, on the client side you can override the server's affinity for just that one test, using the n,m form of argument. Note that when using this feature, a process will only be bound to a single CPU (as opposed to a set containing potentialy multiple CPUs).
-B ", " --bind " host" bind to a specific interface. If the host has multiple interfaces, it will use the first interface by default.
-V ", " --verbose " " give more detailed output
-J ", " --json " " output in JSON format
--logfile " file" send output to a log file.
--forceflush " " force flushing output at every interval. Used to avoid buffering when sending output to pipe.
-d ", " --debug " " emit debugging output. Primarily (perhaps exclusively) of use to developers.
-v ", " --version " " show version information and quit
-h ", " --help " " show a help synopsis
-s ", " --server " " run in server mode
-D ", " --daemon " " run the server in background as a daemon
-I ", " --pidfile " file" write a file with the process ID, most useful when running as a daemon.
-1 ", " --one-off handle one client connection, then exit.
--rsa-private-key-path " file" path to the RSA private key (not password-protected) used to decrypt authentication credentials from the client (if built with OpenSSL support).
--authorized-users-path " file" path to the configuration file containing authorized users credentials to run iperf tests (if built with OpenSSL support). The file is a comma separated list of usernames and password hashes; more information on the structure of the file can be found in the EXAMPLES section.
-c ", " --client " host" run in client mode, connecting to the specified server. By default, a test consists of sending data from the client to the server, unless the -R flag is specified.
--sctp use SCTP rather than TCP (FreeBSD and Linux)
-u ", " --udp use UDP rather than TCP
--connect-timeout " n" set timeout for establishing the initial control connection to the server, in milliseconds. The default behavior is the operating system's timeout for TCP connection establishment. Providing a shorter value may speed up detection of a down iperf3 server.
-b ", " --bitrate " n[KM]" set target bitrate to n bits/sec (default 1 Mbit/sec for UDP, unlimited for TCP/SCTP). If there are multiple streams (-P flag), the throughput limit is applied separately to each stream. You can also add a '/' and a number to the bitrate specifier. This is called "burst mode". It will send the given number of packets without pausing, even if that temporarily exceeds the specified throughput limit. Setting the target bitrate to 0 will disable bitrate limits (particularly useful for UDP tests). This throughput limit is implemented internally inside iperf3, and is available on all platforms. Compare with the --fq-rate flag. This option replaces the --bandwidth flag, which is now deprecated but (at least for now) still accepted.
--pacing-timer " n[KMG]" set pacing timer interval in microseconds (default 1000 microseconds, or 1 ms). This controls iperf3's internal pacing timer for the -b/--bitrate option. The timer fires at the interval set by this parameter. Smaller values of the pacing timer parameter smooth out the traffic emitted by iperf3, but potentially at the cost of performance due to more frequent timer processing.
--fq-rate " n[KM]" Set a rate to be used with fair-queueing based socket-level pacing, in bits per second. This pacing (if specified) will be in addition to any pacing due to iperf3's internal throughput pacing (-b/--bitrate flag), and both can be specified for the same test. Only available on platforms supporting the SO_MAX_PACING_RATE socket option (currently only Linux). The default is no fair-queueing based pacing.
--no-fq-socket-pacing This option is deprecated and will be removed. It is equivalent to specifying --fq-rate=0.
-t ", " --time " n" time in seconds to transmit for (default 10 secs)
-n ", " --bytes " n[KM]" number of bytes to transmit (instead of -t)
-k ", " --blockcount " n[KM]" number of blocks (packets) to transmit (instead of -t or -n)
-l ", " --length " n[KM]" length of buffer to read or write. For TCP tests, the default value is 128KB. In the case of UDP, iperf3 tries to dynamically determine a reasonable sending size based on the path MTU; if that cannot be determined it uses 1460 bytes as a sending size. For SCTP tests, the default size is 64KB.
--cport " port" bind data streams to a specific client port (for TCP and UDP only, default is to use an ephemeral port)
-P ", " --parallel " n" number of parallel client streams to run. Note that iperf3 is single threaded, so if you are CPU bound, this will not yield higher throughput.
-R ", " --reverse reverse the direction of a test, so that the server sends data to the client
-w ", " --window " n[KM]" window size / socket buffer size (this gets sent to the server and used on that side too)
-M ", " --set-mss " n" set TCP/SCTP maximum segment size (MTU - 40 bytes)
-N ", " --no-delay " " set TCP/SCTP no delay, disabling Nagle's Algorithm
-4 ", " --version4 " " only use IPv4
-6 ", " --version6 " " only use IPv6
-S ", " --tos " n" set the IP type of service
"--dscp " dscp set the IP DSCP bits. Both numeric and symbolic values are accepted.
-L ", " --flowlabel " n" set the IPv6 flow label (currently only supported on Linux)
-X ", " --xbind " name" Bind SCTP associations to a specific subset of links using sctp_bindx(3). The --B flag will be ignored if this flag is specified. Normally SCTP will include the protocol addresses of all active links on the local host when setting up an association. Specifying at least one --X name will disable this behaviour. This flag must be specified for each link to be included in the association, and is supported for both iperf servers and clients (the latter are supported by passing the first --X argument to bind(2)). Hostnames are accepted as arguments and are resolved using getaddrinfo(3). If the --4 or --6 flags are specified, names which do not resolve to addresses within the specified protocol family will be ignored.
--nstreams " n" Set number of SCTP streams.
-Z ", " --zerocopy " " Use a "zero copy" method of sending data, such as sendfile(2), instead of the usual write(2).
-O ", " --omit " n" Omit the first n seconds of the test, to skip past the TCP slow-start period.
-T ", " --title " str" Prefix every output line with this string.
-C ", " --congestion " algo" Set the congestion control algorithm (Linux and FreeBSD only). An older --linux-congestion synonym for this flag is accepted but is deprecated.
"--get-server-output" Get the output from the server. The output format is determined by the server (in particular, if the server was invoked with the --json flag, the output will be in JSON format, otherwise it will be in human-readable format). If the client is run with --json, the server output is included in a JSON object; otherwise it is appended at the bottom of the human-readable output.
--username " username" username to use for authentication to the iperf server (if built with OpenSSL support). The password will be prompted for interactively when the test is run.
--rsa-public-key-path " file" path to the RSA public key used to encrypt authentication credentials (if built with OpenSSL support)