OS Manuals

/usr/bin/iperf

A tool to measure IP bandwidth using UDP or TCP

From iperf 2.2.1-r9 (os), captured 2026-11-05 by running iperf --help (exit 0). permalink

Usage: iperf [-s|-c host] [options]
       iperf [-h|--help] [-v|--version]

Client/Server:
  -b, --bandwidth #[kmgKMG | pps]  bandwidth to read/send at in bits/sec or packets/sec
  -e, --enhanced    use enhanced reporting giving more tcp/udp and traffic information
  -f, --format    [kmgKMG]   format to report: Kbits, Mbits, KBytes, MBytes
      --hide-ips           hide ip addresses and host names within outputs
      --histograms         enable histograms (see client or server for more)
  -i, --interval  #        seconds between periodic bandwidth reports
  -l, --len       #[kmKM]    length of buffer in bytes to read or write (Defaults: TCP=128K, v4 UDP=1470, v6 UDP=1450)
  -m, --print_mss          print TCP maximum segment size
  -o, --output    <filename> output the report or error message to this specified file
  -p, --port      #        client/server port to listen/send on and to connect
      --permit-key         permit key to be used to verify client and server (TCP only)
      --tcp-tx-delay       set socket option of TCP_TX_DELAY (units is milliseconds)
      --sum-only           output sum only reports
  -u, --udp                use UDP rather than TCP
      --utc                use coordinated universal time (UTC) with time output
  -w, --window    #[KM]    TCP window size (socket buffer size)
  -z, --realtime           request realtime scheduler
  -B, --bind <host>[:<port>][%<dev>] bind to <host>, ip addr (including multicast address) and optional port and device
  -C, --compatibility      for use with older versions does not sent extra msgs
      --NUM_REPORT_STRUCTS increase the shared memory between the traffic threads and the reporter thread (default is 10,000 entries)
  -M, --mss       #        set TCP maximum segment size using TCP_MAXSEG
  -N, --nodelay            set TCP no delay, disabling Nagle's Algorithm
  -S, --tos       #        set the socket's IP_TOS (byte) field
  -Z, --tcp-congestion <algo>  set TCP congestion control algorithm (Linux only)

Server specific:
  -p, --port      #[-#]    server port(s) to listen on/connect to
  -s, --server             run in server mode
  -1, --singleclient       run one server at a time
      --histograms         enable latency histograms
      --jitter-histograms  enable jitter histograms
      --permit-key-timeout set the timeout for a permit key in seconds
      --skip-rx-copy       set MSG_TRUNC to avoid kernel to application spaced copy of data
      --tcp-rx-window-clamp set the TCP receive window clamp size in bytes
      --test-exchange-timeout set the timeout on the test exchange, use 0 for no timeout
      --tap-dev   #[<dev>] use TAP device to receive at L2 layer
  -t, --time      #        time in seconds to listen for new connections as well as to receive traffic (default not set)
  -B, --bind <ip>[%<dev>]  bind to multicast address and optional device
  -U, --single_udp         run in single threaded UDP mode
      --sum-dstip          sum traffic threads based upon destination ip address (default is src ip)
  -D, --daemon             run the server as a daemon
  -V, --ipv6_domain        Enable IPv6 reception by setting the domain and socket to AF_INET6 (Can receive on both IPv4 and IPv6)

Client specific:
      --bounceback         request a bounceback test (use -l for size, defaults to 100 bytes)
      --bounceback-hold    request the server to insert a delay of n milliseconds between its read and write
      --bounceback-no-quickack request the server not set the TCP_QUICKACK socket option (disabling TCP ACK delays) during a bounceback test
      --bounceback-period  request the client schedule a send every n milliseconds
       --bounceback-reply   set the bounceback reply message size (defaults to symmetric)
       --bounceback-txdelay  request the bounceback server delay n seconds between the request and the reply
   -c, --client    <host>   run in client mode, connecting to <host>
      --connect-only       run a connect only test
      --connect-retry-timer minimum time interval in seconds between application level connect retries
      --connect-retry-time time interval in seconds to attempt application level connect retries
      --dscp               set the DSCP field (masking ECN bits) in TOS byte
  -d, --dualtest           Do a bidirectional test simultaneously (multiple sockets)
      --fq-rate #[kmgKMG]  bandwidth to socket pacing
      --fq-rate-step #[kmgKMG]  step value to socket pacing
      --fq-rate-step-interval #[kmgKMG]  step interval (in seconds) for socket pacing
      --full-duplex        run full duplex test using same socket
      --histograms         enable histograms for --tcp-write-times
      --ignore-shutdown    don't wait on the TCP shutdown or close (fin & finack) rather use the final write as the ending event
      --incr-dstip         Increment the destination ip with parallel (-P) traffic threads
      --incr-dstport       Increment the destination port with parallel (-P) traffic threads
      --incr-srcip         Increment the source ip with parallel (-P) traffic threads
      --incr-srcport       Increment the source port with parallel (-P) traffic threads
      --ipg                set the the interpacket gap (milliseconds) for packets within an isochronous frame
      --isochronous <frames-per-second>:<mean>,<stddev> send traffic in bursts (frames - emulate video traffic)
      --local-only         Set don't route on socket
      --near-congestion=[w] Use a weighted write delay per the sampled TCP RTT (experimental)
      --no-connect-sync    No sychronization after connect when -P or parallel traffic threads
      --no-udp-fin         No final server to client stats at end of UDP test
  -n, --num       #[kmgKMG]    number of bytes to transmit (instead of -t)
      --sync-transfer-id   pass the clients' transfer id(s) to the server so both will use the same id in their respective outputs
  -r, --tradeoff           Do a fullduplexectional test individually
      --tcp-quickack       set the socket's TCP_QUICKACK option (off by default)
      --tcp-write-prefetch set the socket's TCP_NOTSENT_LOWAT value in bytes and use event based writes
      --tcp-write-times    measure the socket write times at the application level
  -t, --time      #        time in seconds to transmit for (default 10 secs)
      --trip-times         enable end to end measurements (requires client and server clock sync)
      --txdelay-time       time in seconds to hold back after connect and before first write
      --txstart-time       unix epoch time to schedule first write and start traffic
      --udp-l4s            run a UDP L4S flow
      --udp-l4s-video      run a UDP L4S video flow
  -B, --bind [<ip> | <ip:port>] bind ip (and optional port) from which to source traffic
  -F, --fileinput <name>   input the data to be transmitted from a file
  -H, --ssm-host <ip>      set the SSM source, use with -B for (S,G)
  -I, --stdin              input the data to be transmitted from stdin
  -L, --listenport #       port to receive fullduplexectional tests back on
  -P, --parallel  #        number of parallel client threads to run
  -R, --reverse            reverse the test (client receives, server sends)
  -S, --tos                IP DSCP or tos settings
  -T, --ttl       #        time-to-live, for multicast (default 1)
      --working-load request working load(s)
      --working-load-cca set working load CCA
  -V, --ipv6_domain        Set the domain to IPv6 (send packets over IPv6)
  -X, --peer-detect        perform server version detection and version exchange

Miscellaneous:
  -x, --reportexclude [CDMSV]   exclude C(connection) D(data) M(multicast) S(settings) V(server) reports
  -y, --reportstyle C      report as a Comma-Separated Values
  -h, --help               print this message and quit
  -v, --version            print version information and quit

[kmgKMG] Indicates options that support a k,m,g,K,M or G suffix
Lowercase format characters are 10^3 based and uppercase are 2^n based
(e.g. 1k = 1000, 1K = 1024, 1m = 1,000,000 and 1M = 1,048,576)

Accepted tos values are: af11, af12, af13, af21, af22, af23, af31, af32, af33, af41, af42, af43,
cs0, cs1, cs2, cs3, cs4, cs5, cs6, cs7, ef, le, nqb, nqb2, ac_be, ac_bk, ac_vi, ac_vo, lowdelay, throughput,
reliability, or a numeric value.

The TCP window size option can be set by the environment variable
TCP_WINDOW_SIZE. Most other options can be set by an environment variable
IPERF_<long option name>, such as IPERF_BANDWIDTH.

Source at <http://sourceforge.net/projects/iperf2/>
Report bugs to <iperf-users@lists.sourceforge.net>
Options (91)
OptionDescriptionSource
-b, --bandwidth #[kmgKMGset the target bandwidth and optional standard deviation per <mean>,[<stdev>] (See NOTES for suffixes) Setting the target bitrate on the client to 0 will disable bitrate limits (particularly useful…help + man
-e, --enhancedDisplay enhanced output in reports otherwise use legacy report (ver 2.0.5) formatting (see NOTES)help + man
-f, --format[kmgKMG] format to report: Kbits, Mbits, KBytes, MByteshelp
--hide-ipsobscure ip addresses in output (useful when wanting to publish results and not display the full ip addresses.help + man
--histogramsenable histograms (see client or server for more)help
-i, --intervalsample or display interval reports every t seconds (default) or every frame or burst, i.e. if f is used then the interval will be each frame or burst.help + man
-l, --len#[kmKM] length of buffer in bytes to read or write (Defaults: TCP=128K, v4 UDP=1470, v6 UDP=1450)help
-m, --print_mssprint TCP maximum segment sizehelp + man
-o, --output filename<filename> output the report or error message to this specified filehelp + man
-p, --port# client/server port to listen/send on and to connecthelp
--permit-keypermit key to be used to verify client and server (TCP only)help
--tcp-tx-delay nset socket option of TCP_TX_DELAY (units is milliseconds)help + man
--sum-onlyset the output to sum reports only.help + man
-u, --udpuse UDP rather than TCPhelp + man
--utcuse coordinated universal time (UTC) when outputting time (otherwise use local time)help + man
-w, --window#[KM] TCP window size (socket buffer size)help
-z, --realtimeRequest real-time scheduler, if supported.help + man
-C, --compatibilityfor use with older versions does not sent extra msgshelp + man
-M, --mss n# set TCP maximum segment size using TCP_MAXSEGhelp + man
-N, --nodelayset TCP no delay, disabling Nagle's Algorithmhelp + man
-S, --tos val# set the socket's IP_TOS (byte) fieldhelp + man
-Z, --tcp-congestion algoSet the default congestion control algorithm to be used for new connections.help + man
-s, --serverrun in server modehelp + man
-1, --singleclientset the server to process only one client at a timehelp + man
--jitter-histogramsenable jitter histogramshelp
--skip-rx-copyset MSG_TRUNC to avoid kernel to application spaced copy of datahelp + man
--tap-dev devSet the receive interface to the TAP device as specified.help + man
-t, --time n# time in seconds to listen for new connections as well as to receive traffic (default not set)help + man
-B, --bind ip>[%<devbind src ip addr and optional src device for receivinghelp + man
-U, --single_udprun in single threaded UDP modehelp + man
--sum-dstipsum traffic threads based upon the destination IP address (default is source ip address)help + man
-D, --daemonrun the server as a daemon.help + man
-V, --ipv6_domainEnable IPv6 reception by setting the domain and socket to AF_INET6 (Can receive on both IPv4 and IPv6)help + man
--bouncebackrequest a bounceback test (use -l for size, defaults to 100 bytes)help
--bounceback-hold nrequest the server to insert a delay of n milliseconds between its read and write (default is no delay)help + man
--bounceback-periodrequest the client schedule a send every n millisecondshelp
--bounceback-reply nset the bounceback reply message size (defaults to symmetric)help + man
--bounceback-txdelay nrequest the client to delay n seconds between the start of the working load and the bounceback traffic (default is no delay)help + man
-c, --client hostrun in client mode, connecting to host where the optional %dev will SO_BINDTODEVICE that output interface (requires root and see NOTES)help + man
--connect-onlyrun a connect only testhelp
--dscpset the DSCP field (masking ECN bits) in the TOS byte (used by IP_TOS & setsockopt)help + man
-d, --dualtestDo a bidirectional test simultaneous test using two unidirectional socketshelp + man
--fq-rate #[kmgKMGbandwidth to socket pacinghelp
--fq-rate-step #[kmgKMGstep value to socket pacinghelp
--fq-rate-step-interval #[kmgKMGstep interval (in seconds) for socket pacinghelp + man
--full-duplexrun a full duplex test, i.e. traffic in both transmit and receive directions using the same sockethelp + man
--ignore-shutdowndon't wait on the TCP shutdown or close (fin & finack) rather use the final write as the ending eventhelp + man
--incr-dstipincrement the destination ip address when using the parallel (-P) or port range optionhelp + man
--incr-dstportincrement the destination port when using the parallel (-P) or port range optionhelp + man
--incr-srcipincrement the source ip address when using the parallel (-P) or port range optionhelp + man
--incr-srcportincrement the source ip address when using the parallel (-P) or port range option, requires -B to set the src porthelp + man
--ipg nset the inter-packet gap to n (units of seconds) for packets or within a frame/burst when --isochronous is sethelp + man
--local-onlySet don't route on sockethelp
--no-connect-syncBy default, parallel traffic threads (per -P greater than 1) will synchronize after their TCP connects and prior to each sending traffic, i.e. all the threads first complete (or error) the TCP 3WHS…help + man
--no-udp-finDon't perform the UDP final server to client exchange which means there won't be a final server report displayed on the client.help + man
-n, --num#[kmgKMG] number of bytes to transmit (instead of -t)help
--sync-transfer-idpass the clients' transfer id(s) to the server so both will use the same id in their respective outputshelp + man
-r, --tradeoffDo a bidirectional test individually - client-to-server, followed by a reversed test, server-to-clienthelp + man
--tcp-quickackset the socket's TCP_QUICKACK option (off by default)help + man
--tcp-write-timesmeasure the socket write times at the application levelhelp + man
--trip-timesenable the measurement of end to end write to read latencies (client and server clocks must be synchronized.) See notes about tcp-write-prefetch being enabled.help + man
--txdelay-timetime in seconds to hold back or delay after the TCP connect and prior to the socket writes.help + man
--txstart-time n.nset the txstart-time to n.n using unix or epoch time format (supports microsecond resolution, e.g 1536014418.123456) An example to delay one second using command substitution is iperf -c 192.168.1.10…help + man
--udp-l4srun an l4s traffic load (requires a iperf server that supports l4s)help + man
--udp-l4s-videorun a UDP L4S video flowhelp
-F, --fileinput nameinput the data to be transmitted from a filehelp + man
-H, --ssm-host ipSet the source host (ip addr) per SSM multicast, i.e. the S of the S,Ghelp + man
-I, --stdininput the data to be transmitted from stdinhelp + man
-L, --listenport #port to receive fullduplexectional tests back onhelp + man
-P, --parallel n# number of parallel client threads to runhelp + man
-R, --reverse, --removereverse the test (client receives, server sends)help + man
-T, --ttl n# time-to-live, for multicast (default 1)help + man
-X, --peer-detect, --peerdetectperform server version detection and version exchangehelp + man
-x, --reportexclude CDMSVexclude C(connection) D(data) M(multicast) S(settings) V(server) reportshelp
-y, --reportstyle Cif set to C or c report results as CSV (comma separated values)help + man
-h, --helpprint this message and quithelp + man
-v, --versionprint version information and quithelp + man
--l2checksperform layer 2 length checks on received UDP packets (requires systems that support packet sockets, e.g. Linux) (in the manual page but not in --help)man
--NUM_REPORT_STRUCTS countOverride the default shared memory size between the traffic thread(s) and reporter thread in order to mitigate mutex lock contentions. (in the manual page but not in --help)man
--tcp-ccaSet the congestion control algorithm to be used for TCP connections. (in the manual page but not in --help)man
--working-load-ccaSet the congestion control algorithm to be used for TCP working loads. (in the manual page but not in --help)man
--permit-key-timeout valueSet the lifetime of the permit key in seconds. (in the manual page but not in --help)man
--test-exchange-timeout valueSet the maximum wait time for a test excahnge in seconds. (in the manual page but not in --help)man
--tos-override valset the socket's IP_TOS value for reverse or full duplex traffic. (in the manual page but not in --help)man
--working-loadEnable support for TCP working loads on UDP traffic streams (in the manual page but not in --help)man
--bounceback-no-quickackrequest the server not set the TCP_QUICKACK socket option (disabling TCP ACK delays) during a bounceback test (see NOTES) (in the manual page but not in --help)man
--bounceback-request nset the bounceback request size in units bytes. (in the manual page but not in --help)man
--burst-period nSet the burst period in seconds. (in the manual page but not in --help)man
--burst-size nSet the burst size in bytes. (in the manual page but not in --help)man
--connect-retry-time ntime value in seconds for application level retries of TCP connect(s). (in the manual page but not in --help)man
--connect-retry-timer nThe minimum time value in seconds to wait before retrying the connect. (in the manual page but not in --help)man

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.