반응형
서버 스크립트 (iperf-server.bat)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
@echo off
@REM iperf-server
@REM launch the iperf server which will wait for the iperf client to connect
@REM Updated 2021-04-20
SET PORT=5201
SET FORMAT="m"
IF NOT EXIST Lib\iperf3.exe ECHO Unable to find iperf3.exe. Unable to continue & EXIT 1
@REM 서버IP표시
echo -----------------------------------------------------------
for /f "delims=[] tokens=2" %%a in ('ping -4 -n 1 %ComputerName% ^| findstr [') do set NetworkIP=%%a
echo 서버IP: %NetworkIP%
echo -----------------------------------------------------------
SET /P PORT=Enter a port to run on (%PORT%):
Lib\iperf3.exe -s -p %PORT% -f %FORMAT%
:END
ECHO Done
PAUSE
|
cs |
클라이언트 스크립트 (iperf-client.bat)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
@ECHO off
@REM iperf3-client
@REM Connects to the iperf-server host and begins data transfer.
@REM Updated 2021-04-20
@REM FORMAT옵션
@REM k = K bit K = KB/s m : M bit M : MBytes/s g : Gbps G : GB/s
IF NOT EXIST Lib\iperf3.exe ECHO could NOT find iperf3.exe. Unable to continue & exit 1
:SETUP
SET SERVER="localhost"
SET PORT=5201
SET TCPWIN="128k"
SET FORMAT="m"
SET INTERVAL=1
SET TESTLEN=10
SET UDP=n
SET LOGFILE=logfile
:CONTINUE
echo -----------------------------------------------------------
SET /P SERVER=iPerf 서버 아이피를 입력하세요:
echo -----------------------------------------------------------
SET /P PORT=통신포트를 입력하세요 (%PORT%):
echo -----------------------------------------------------------
SET /P UDP=UDP프로토콜로 테스트하시겠습니까 (y/N):
echo -----------------------------------------------------------
SET /P TESTLEN=대역폭 테스트 시간(초단위) (%TESTLEN%):
echo -----------------------------------------------------------
SET /P INTERVAL=결과출력 간격을 지정하세요(초단위) (%INTERVAL%):
echo -----------------------------------------------------------
ECHO Test started on %DATE% %TIME%
IF %UDP% == n Lib\iperf3.exe -c %SERVER% -p %PORT% -f %FORMAT% -i %INTERVAL% -t %TESTLEN%
IF %UDP% == N Lib\iperf3.exe -c %SERVER% -p %PORT% -f %FORMAT% -i %INTERVAL% -t %TESTLEN%
IF %UDP% == y Lib\iperf3.exe -c %SERVER% -p %PORT% -u -f %FORMAT% -i %INTERVAL% -t %TESTLEN%
IF %UDP% == Y Lib\iperf3.exe -c %SERVER% -p %PORT% -u -f %FORMAT% -i %INTERVAL% -t %TESTLEN%
:END
ECHO Done
PAUSE
EXIT 0
|
cs |
1Gbps 네트워크 결과
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
Test started on 2021-04-20 11:01:21.53
Connecting to host 192.168.1.210, port 5201
[ 4] local 192.168.1.250 port 10733 connected to 192.168.1.210 port 5201
[ ID] Interval Transfer Bandwidth
[ 4] 0.00-1.00 sec 113 MBytes 950 Mbits/sec
[ 4] 1.00-2.00 sec 112 MBytes 936 Mbits/sec
[ 4] 2.00-3.00 sec 113 MBytes 949 Mbits/sec
[ 4] 3.00-4.00 sec 112 MBytes 944 Mbits/sec
[ 4] 4.00-5.00 sec 112 MBytes 944 Mbits/sec
[ 4] 5.00-6.00 sec 113 MBytes 949 Mbits/sec
[ 4] 6.00-7.00 sec 113 MBytes 949 Mbits/sec
[ 4] 7.00-8.00 sec 112 MBytes 941 Mbits/sec
[ 4] 8.00-9.00 sec 113 MBytes 949 Mbits/sec
[ 4] 9.00-10.00 sec 113 MBytes 949 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval Transfer Bandwidth
[ 4] 0.00-10.00 sec 1.10 GBytes 946 Mbits/sec sender
[ 4] 0.00-10.00 sec 1.10 GBytes 946 Mbits/sec receiver
|
cs |
100Mbps 네트워크 결과
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
Test started on 2021-04-21 13:16:35.55
Connecting to host 10.220.5.250, port 5201
[ 4] local 10.220.5.41 port 1265 connected to 10.220.5.250 port 5201
[ ID] Interval Transfer Bandwidth
[ 4] 0.00-1.00 sec 11.5 MBytes 96.5 Mbits/sec
[ 4] 1.00-2.00 sec 11.2 MBytes 94.4 Mbits/sec
[ 4] 2.00-3.01 sec 11.4 MBytes 94.5 Mbits/sec
[ 4] 3.01-4.01 sec 11.2 MBytes 94.5 Mbits/sec
[ 4] 4.01-5.01 sec 11.2 MBytes 94.5 Mbits/sec
[ 4] 5.01-6.01 sec 11.2 MBytes 94.4 Mbits/sec
[ 4] 6.01-7.01 sec 11.2 MBytes 94.4 Mbits/sec
[ 4] 7.01-8.01 sec 11.2 MBytes 94.3 Mbits/sec
[ 4] 8.01-9.01 sec 11.2 MBytes 94.6 Mbits/sec
[ 4] 9.01-10.00 sec 11.2 MBytes 94.5 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval Transfer Bandwidth
[ 4] 0.00-10.00 sec 113 MBytes 94.6 Mbits/sec sender
[ 4] 0.00-10.00 sec 113 MBytes 94.6 Mbits/sec receiver
|
cs |
https://iperf.fr/iperf-download.php
https://github.com/matthewlinton/Windows-Scripts/tree/master/iPerf
'Linux > 모니터링' 카테고리의 다른 글
Cockpit (0) | 2019.09.04 |
---|---|
glances 설치 (0) | 2017.03.19 |