본문 바로가기

LINUX

[리눅스] 네트워크 성능측정 툴 iperf 사용방법



'iperf'는 서버와 클라이언트 간 네트워크 대역폭을 측정하는 프로그램이다.


'iperf' 사용방법 (리눅스)


1. OS버전에 맞는 'iperf' 다운로드 (예제: iperf3-3.1.3-1.fc24.x86_64.rpm)


 - URL: https://iperf.fr/iperf-download.php) 또는 wget 활용


  [root@server~]# wget https://iperf.fr/download/fedora/iperf3-3.1.3-1.fc24.x86_64.rpm




2. 다운받은 'iperf' 설치



  [root@server ~]# rpm -ivh iperf3-3.1.3-1.fc24.x86_64.rpm

   Preparing...                          ################################# [100%]

   Updating / installing...

      1:iperf3-3.1.3-1.fc24              ################################# [100%]

  [root@server ~]#




3. iperf 서버 실행 (iperf3 -s)


  [root@server ~]# iperf3 -s

   -----------------------------------------------------------

   Server listening on 5201

   -----------------------------------------------------------




4. iperf 클라이언트 실행 및 결과 (예제 서버IP: 192.168.0.110)



  [root@client~]# iperf3 -c 192.168.0.85

   Connecting to host 192.168.0.110, port 5201

   [  4] local 192.168.0.84 port 36254 connected to 192.168.0.85 port 5201

   [ ID] Interval           Transfer     Bandwidth       Retr  Cwnd

   [  4]   0.00-1.00   sec   416 MBytes  3.49 Gbits/sec    0    875 KBytes

   [  4]   1.00-2.00   sec   454 MBytes  3.80 Gbits/sec    0    980 KBytes

   [  4]   2.00-3.00   sec   455 MBytes  3.82 Gbits/sec    0   1015 KBytes

   [  4]   3.00-4.00   sec   454 MBytes  3.80 Gbits/sec    0   1.04 MBytes

   [  4]   4.00-5.00   sec   451 MBytes  3.79 Gbits/sec    0   1.07 MBytes

   [  4]   5.00-6.00   sec   450 MBytes  3.77 Gbits/sec    0   1.09 MBytes

   [  4]   6.00-7.00   sec   449 MBytes  3.77 Gbits/sec    0   1.10 MBytes

   [  4]   7.00-8.00   sec   446 MBytes  3.75 Gbits/sec    0   1.11 MBytes

   [  4]   8.00-9.00   sec   452 MBytes  3.79 Gbits/sec    0   1.13 MBytes

   [  4]   9.00-10.00  sec   446 MBytes  3.74 Gbits/sec    0   1.14 MBytes

   - - - - - - - - - - - - - - - - - - - - - - - - -

   [ ID] Interval           Transfer     Bandwidth       Retr

   [  4]   0.00-10.00  sec  4.37 GBytes  3.75 Gbits/sec    0             sender

   [  4]   0.00-10.00  sec  4.36 GBytes  3.75 Gbits/sec                  receiver


   iperf Done.




# 클라이언트 명령어 및 옵션

- # iperf3 -c 서버아이피 (기본값: Interval=1, Time:=10sec / 1초에 한번씩 10초간 측정)

iperf3 -c 서버아이피 -i 2 -t 60 (2초에 한번씩 1분간 측정)

- 자세한 명령어는 man page 참조 (URL: https://linux.die.net/man/1/iperf)