iperf network testing

转载:http://cheatsheet.logicalwebhost.com/iperf-network-testing/

iperf network testing

iperf is a strain test for networks/memory/disk, but is commonly used to find network problems. You have to install iperf as a server on some box on one end of the network, then use the iperf client on your laptop somewhere else on the network to run the throughput test. On Debian SERVER do:

cd /usr/src
apt-get install build-essential git
git clone https://github.com/esnet/iperf.git
cd iperf
./configure
make
make install
iperf3 -s
------------------------------------------------------------
Server listening on TCP port 5001
TCP window size: 85.3 KByte (default)
------------------------------------------------------------
if you get an error:
iperf3: error while loading shared libraries: libiperf.so.0: cannot open shared object file: No such file or directory
you have to point to the right file:
cd /
find ./ | grep libiperf.so.0
  ./usr/src/iperf/iperf/src/.libs/libiperf.so.0.0.0
  ./usr/src/iperf/iperf/src/.libs/libiperf.so.0
  ./usr/local/lib/libiperf.so.0.0.0
  ./usr/local/lib/libiperf.so.0
echo $LD_LIBRARY_PATH
 
if you get a blank, the path does not work, so do:
LD_LIBRARY_PATH=/usr/local/lib
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/libiperf.so.0
export LD_LIBRARY_PATH
iperf3 -s
-----------------------------------------------------------
Server listening on 5201
-----------------------------------------------------------

If you want these to persist across reboot edit /root/.bashrc (or wherever you want to load your variables from for this user) and add these lines to the end of the file:

vi /root/.bashrc
  LD_LIBRARY_PATH=/usr/local/lib
  LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/libiperf.so.0
  export LD_LIBRARY_PATH

Now go to you LAPTOP somewhere else on the network and do:

iperf3 -c iperf.serv.er.ip -i 1 -t 10
  Connecting to host iperf.serv.er.ip, port 5201
  [  4] local you.r.i.p port 61110 connected to iperf.serv.er.ip port 5201
  [ ID] Interval           Transfer     Bandwidth
  [  4]   0.00-1.00   sec  5.64 MBytes  47.3 Mbits/sec                  
  [  4]   1.00-2.00   sec  6.45 MBytes  54.1 Mbits/sec                  
  [  4]   2.00-3.00   sec  4.79 MBytes  40.2 Mbits/sec                  
  [  4]   3.00-4.00   sec  5.40 MBytes  45.3 Mbits/sec                  
  [  4]   4.00-5.00   sec  2.31 MBytes  19.4 Mbits/sec                  
  [  4]   5.00-6.00   sec  3.89 MBytes  32.7 Mbits/sec                  
  [  4]   6.00-7.00   sec  5.11 MBytes  42.8 Mbits/sec                  
  [  4]   7.00-8.00   sec  4.22 MBytes  35.4 Mbits/sec                  
  [  4]   8.00-9.00   sec  4.90 MBytes  41.2 Mbits/sec                  
  [  4]   9.00-10.00  sec  4.11 MBytes  34.4 Mbits/sec                  
  - - - - - - - - - - - - - - - - - - - - - - - - -
  [ ID] Interval           Transfer     Bandwidth
  [  4]   0.00-10.00  sec  46.8 MBytes  39.3 Mbits/sec                  sender
  [  4]   0.00-10.00  sec  46.8 MBytes  39.3 Mbits/sec                  receiver
  iperf Done.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值