iperf 為一 linux 上用來測試網路效能的工具~
radhat base 下的系統可以使用 dag.repo 來進行安裝。也可以自行下載 tarball 進行安裝。
-------------------
# 使 yum 安裝
[root@server]# cat /etc/yum.repos.d/dag.repo 
[dag]
name=DAG (http://dag.wieers.com) add-on packages, no formal support from CERN
baseurl=http://linuxsoft.cern.ch/dag/redhat/el5/en/$basearch/dag
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-dag
gpgcheck=1
enabled=1
protect=0
[root@server]# yum install iperf 
------------------- 
#使用 tarball 安裝
[root@server]# tar zxvf iperf-2.0.5.tar.gz
[root@server]#ls
[root@server]#cd iperf-2.0.5
[root@server]#ll
[root@server]# ./configure ; make; make install
[root@server]# iperf --version
-------------------
指令的基本下法:
對測的兩台主機都要安裝 iperf.
流量的方向是 client -> server
不特別指定時,預設是使用 TCP 來測試。 
server# iperf -s -p <port> 
client# iperf -c <server host> -p <port> -t <all_test_time> -i < time interval >
  
-s  指定起一個 iperf server  的daemon. 
-c  指定 run client command. 
-p  要使用的port。 預設使用 5001 ,如果有跟其它 service 衝突,就需要另外指定。
-t   指定總測試時間。預設跑10秒。
-i    指定結果輸出的間隔。 
EX:
server# iperf -s 
client# iperf -c server.host.tw 
  
server# iperf -s -p 9002
client# iperf -c server.host.tw -p 9002 -t 60 -i 5
# 從 client 往 server.host.tw 進行傳輸,指定9002 port ,  總測試時間 60 秒,每5秒秀一次結果。
----
http://en.wikipedia.org/wiki/Iperf
iperf 2.0.5 tarabll ( sourceforge )
 
沒有留言:
張貼留言