NotePublic/Software/Applications/IPerf/IPerf_使用说明.md

54 lines
1.6 KiB
Markdown
Raw Normal View History

# IPerf 使用说明
IPerf 可用于网络带宽测试,可在 Windows、Linux、Android、MacOS 和 iOS 系统下运行。主要有 IPerf2 和 IPerf3 两大版本。
IPerf 可做为 Server 端或 Client 端运行Client 发起与 Server 端的通讯,并对通讯性能进行分析。
## 单线程 TCP 测试
```sh
# Server
iperf3 -s -p <port>
# Client
iperf3 -c <server ip> -p <server port> -i <interval> -t <time>
```
## 多线程 TCP 测试
```sh
# Server
iperf3 -s -p <port>
# Client
iperf3 -c <server ip> -p <server port> -i <interval> -t <time> -P <parallel>
```
## 单线程 UDP 测试
```sh
# Server
iperf3 -s -p <port>
# Client
iperf3 -u -c <host> -p <port> -i <interval> -t <time>
```
## 多线程 UDP 测试
```sh
# Server
iperf3 -s -p <port>
# Client
iperf3 -u -c <host> -p <port> -i <interval> -t <time> -P <parallel>
```
## 基本参数说明
| Options | Description |
|-------------|--------------------------------------------------------------------|
| -i # | Server or Client: seconds between periodic bandwidth reports |
| -p # | Server or Client: server port to listen on/connect to |
| -s | Server specific: run in server mode |
| -c \<host\> | Client specific: run in client mode, connecting to \<host\> |
| -P # | Client specific: number of parallel client streams to run |
| -t # | Client specific: time in seconds to transmit for (default 10 secs) |
| -u | Client specific: use UDP rather than TCP |