上一篇文章对linux操作系统使用的网络测试工具进行了总结。windows操作系统由于其特殊性,测试过程与linux有很大区别,这里将对windows操作系统的网络测试单独进行总结。
netsh interface ipv4 show subinterfaces
netsh interface ipv4 set subinterface "本地连接 2" mtu=1500 store=persistent
C:\>netserver.exe
netserver: fopen of debug file as new stdout failed!: The system cannot find the path specified.
解决方法很简单,在C盘的根目录下新建tmp文件夹即可。原因可以从源代码获得:
Source: netserver.c
#ifndef DEBUG_LOG_FILE
#ifndef WIN32
#define DEBUG_LOG_FILE "/tmp/netperf.debug"
#else
#define DEBUG_LOG_FILE "c:\\temp\\netperf.debug"
#endif /* WIN32 */
#endif /* DEBUG_LOG_FILE */
C:\sriov\NetPerf-2.4.5-w32>iperf3 -c 13.20.1.163
Connecting to host 13.20.1.163, port 5201
[ 4] local 13.20.1.157 port 49217 connected to 13.20.1.163 port 5201
[ ID] Interval Transfer Bandwidth
[ 4] 0.00-1.02 sec 216 MBytes 1.78 Gbits/sec
[ 4] 1.02-2.00 sec 228 MBytes 1.95 Gbits/sec
[ 4] 2.00-3.00 sec 216 MBytes 1.81 Gbits/sec
[ 4] 3.00-4.00 sec 198 MBytes 1.66 Gbits/sec
[ 4] 4.00-5.00 sec 246 MBytes 2.07 Gbits/sec
[ 4] 5.00-6.00 sec 275 MBytes 2.31 Gbits/sec
[ 4] 6.00-7.00 sec 254 MBytes 2.13 Gbits/sec
[ 4] 7.00-8.02 sec 241 MBytes 1.99 Gbits/sec
[ 4] 8.02-9.02 sec 251 MBytes 2.10 Gbits/sec
[ 4] 9.02-10.00 sec 218 MBytes 1.86 Gbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval Transfer Bandwidth
[ 4] 0.00-10.00 sec 2.29 GBytes 1.97 Gbits/sec sender
[ 4] 0.00-10.00 sec 2.29 GBytes 1.97 Gbits/sec receiver
iperf Done.
C:\sriov\NetPerf-2.4.5-w32>iperf3 -c 13.20.1.163
Connecting to host 13.20.1.163, port 5201
[ 4] local 13.20.1.157 port 49219 connected to 13.20.1.163 port 5201
[ ID] Interval Transfer Bandwidth
[ 4] 0.00-1.00 sec 190 MBytes 1.59 Gbits/sec
[ 4] 1.00-2.00 sec 155 MBytes 1.30 Gbits/sec
[ 4] 2.00-3.00 sec 167 MBytes 1.40 Gbits/sec
[ 4] 3.00-4.00 sec 146 MBytes 1.23 Gbits/sec
[ 4] 4.00-5.00 sec 152 MBytes 1.28 Gbits/sec
[ 4] 5.00-6.00 sec 160 MBytes 1.34 Gbits/sec
[ 4] 6.00-7.00 sec 174 MBytes 1.46 Gbits/sec
[ 4] 7.00-8.00 sec 147 MBytes 1.23 Gbits/sec
[ 4] 8.00-9.00 sec 167 MBytes 1.40 Gbits/sec
[ 4] 9.00-10.00 sec 158 MBytes 1.33 Gbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval Transfer Bandwidth
[ 4] 0.00-10.00 sec 1.58 GBytes 1.36 Gbits/sec sender
[ 4] 0.00-10.00 sec 1.58 GBytes 1.36 Gbits/sec receiver
iperf Done.
C:\sriov\NetPerf-2.4.5-w32>iperf3 -c 13.20.1.163
Connecting to host 13.20.1.163, port 5201
[ 4] local 13.20.1.157 port 49227 connected to 13.20.1.163 port 5201
[ ID] Interval Transfer Bandwidth
[ 4] 0.00-1.00 sec 335 MBytes 2.81 Gbits/sec
[ 4] 1.00-2.00 sec 349 MBytes 2.93 Gbits/sec
[ 4] 2.00-3.00 sec 366 MBytes 3.07 Gbits/sec
[ 4] 3.00-4.00 sec 358 MBytes 3.01 Gbits/sec
[ 4] 4.00-5.00 sec 383 MBytes 3.20 Gbits/sec
[ 4] 5.00-6.00 sec 337 MBytes 2.84 Gbits/sec
[ 4] 6.00-7.00 sec 347 MBytes 2.91 Gbits/sec
[ 4] 7.00-8.00 sec 371 MBytes 3.11 Gbits/sec
[ 4] 8.00-9.00 sec 387 MBytes 3.24 Gbits/sec
[ 4] 9.00-10.00 sec 338 MBytes 2.83 Gbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval Transfer Bandwidth
[ 4] 0.00-10.00 sec 3.49 GBytes 3.00 Gbits/sec sender
[ 4] 0.00-10.00 sec 3.49 GBytes 3.00 Gbits/sec receiver
iperf Done.
C:\sriov\NTttcp-v5.33\x86fre>NTttcp.exe -s -a 16 -t 15 -cd 5 -wu 5 -m 1,*,13.20.
1.163
Copyright Version 5.33
Network activity progressing...
Thread Time(s) Throughput(KB/s) Avg B / Compl
====== ======= ================ =============
0 15.016 379823.122 65536.000
##### Totals: #####
Bytes(MEG) realtime(s) Avg Frame Size Throughput(MB/s)
================ =========== ============== ================
5569.750000 15.015 1459.909 370.946
Throughput(Buffers/s) Cycles/Byte Buffers
===================== =========== =============
5935.132 1.421 89116.000
DPCs(count/s) Pkts(num/DPC) Intr(count/s) Pkts(num/intr)
============= ============= =============== ==============
6078.788 10.377 11509.957 5.480
Packets Sent Packets Received Retransmits Errors Avg. CPU %
============ ================ =========== ====== ==========
4000458 947108 1046 0 6.010
其中,Throughput为吞吐量,Packets Sent为发包数,除以测试时间即为包转发量。
ntttcp -r -a 16 -t 60 -cd 5 -wu 5 -v -xml c:\test.xml -m 32,*,13.20.1.44
client端命令为:
ntttcp -s -a 16 -t 60 -cd 5 -wu 5 -m 32,*,13.20.1.44
参数含义:
网易云新用户大礼包:https://www.163yun.com/gift
本文来自网易实践者社区,经作者季涛授权发布。