Linux - iperf - тестирование скорости по TCP/UDP
Материал из Wiki - Iphoster - the best ever hosting and support. 2005 - 2024
Версия от 07:39, 9 апреля 2016; Admin iph (обсуждение | вклад) (Новая страница: «=== Linux - iperf - тестирование скорости по TCP/UDP === На сервере запускаем (тестируем через UDP): # i…»)
Linux - iperf - тестирование скорости по TCP/UDP
На сервере запускаем (тестируем через UDP):
# iperf -s -p 1111 -u -i1 -s - режим сервера -p - порт -u - использовать UDP (по-умолчанию TCP) -i1 - обвнолять результаты каждую секунду.
На клиента запускаем (тестируем через UDP):
# iperf -c server_ip -m -p 1111 -t 60 -u -b 1G -t60 -m - показывать максимальный размер сегмента (MTU - TCP / IP заголовке) -p - порт -u - использовать UDP (по-умолчанию TCP) -b 1G - пропускная способность для UDP (по-умолчанию, 1Mbit/s) -t60 - тестируем в течении 60 секунд
Usage: iperf [-s|-c host] [-p port] [-t secs] [-w bytes] ... iperf [-h|--help] [-v|--version]
Client/Server: -f, --format [kmKM] format to report: Kbits, Mbits, KBytes, MBytes -i, --interval # seconds between periodic bandwidth reports -l, --len #[KM] length of buffer to read or write (default 8 KB) -m, --print_mss print TCP maximum segment size (MTU - TCP/IP header) -p, --port # server port to listen on/connect to -u, --udp use UDP rather than TCP -w, --window #[KM] TCP window size (socket buffer size) -B, --bind bind to , an interface or multicast address -M, --mss # set TCP maximum segment size (MTU - 40 bytes) -N, --nodelay set TCP no delay, disabling Nagle's Algorithm -V, --IPv6Version Set the domain to IPv6
Server specific: -s, --server run in server mode -D, --daemon run the server as a daemon
Client specific: -a, --tcp_bandwidth \ for TCP, bandwidth to send at in bits/sec
#[KM] (default no bandwidth limit used)
-b, --bandwidth #[KM] for UDP, bandwidth to send at in bits/sec (default 1 Mbit/sec, implies -u) -c, --client run in client mode, connecting to -n, --num #[KM] number of bytes to transmit (instead of -t) -t, --time # time in seconds to transmit for (default 10 secs) -F, --fileinput input the data to be transmitted from a file -I, --stdin input the data to be transmitted from stdin -P, --parallel # number of parallel client threads to run -S, --tos # set type-of-service for outgoing packets -T, --ttl # time-to-live, for multicast (default 1) -W, --windowSizeSuggest Run the client so as to suggest a suitable window size (default off)
Miscellaneous: -h, --help print this message and quit -v, --version print version information and quit
[KM] Indicates options that support a K or M suffix for kilo- or mega-
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_, such as IPERF_BANDWIDTH.