네트워크 성능 벤치 및 모니터링 툴 - 윈디하나의 솔라나라
|
root@wl ~/src # wget http://downloads.sourceforge.net/project/iperf/iperf-2.0.5.tar.gz root@wl ~/src # tar xvfz iperf-2.0.5.tar.gz root@wl ~/src # cd iperf-2.0.5 root@wl ~/src/iperf-2.0.5 # vi ./Makefile.in 1) AM_CXXFLAGS = -lrt AM_FLAGS = -lrt root@wl ~/src/iperf-2.0.5 # vi ./src/Makefile.in 1) AM_CXXFLAGS = -lrt AM_FLAGS = -lrt root@wl ~/src/iperf-2.0.5 # vi ./compat/Makefile.in 1) AM_CXXFLAGS = -lrt AM_FLAGS = -lrt root@wl ~/src/iperf-2.0.5 # ./configure root@wl ~/src/iperf-2.0.5 # make root@wl ~/src/iperf-2.0.5 # make install1)
Makefile.in
에서, AM_CXXFLAGS
와 AM_FLAGS
의 -Wall
을 -lrt
로 변경한다. 솔라리스는 nanosleep(3RT)이 librt(3LIB)에 있다. -Wall
은 GCC용 옵션이기 때문에 CC에서 컴파일시 삭제해야 한다.
iperf -s [-u] [-i n] [-p 포트번호] [-w n[KM]] [-D]
iperf -c 서버IP [-u] [-i] [-p 포트번호] [-w n[KM]] [-b n[KM]] [-t n] [-n n[KM]]
-u UDP를 사용. -b 옵션을 반드시 사용해야 한다. -i 출력 간격(초). -p 바인드할 포트 번호. 기본값은 [-p 5001]서버/클라이언트 옵션
-D 데몬으로 실행. -d 양방향 테스트 -b 대역폭. 기본값은 [-b 1M] -n 보낼 전송 회수. -t 대신 사용 -t 보낼 시간(초). 기본값은 [-t 10] -w 윈도 크기(버퍼크기).자세한 사항은
iperf -h
나 iperf(1)을 참조하자.
windy@wl2 ~ $ iperf -s ------------------------------------------------------------ Server listening on TCP port 5001 TCP window size: 48.0 KByte (default) ------------------------------------------------------------ [ 4] local x.x.x.x port 5001 connected with x.x.x.x port 33019 [ ID] Interval Transfer Bandwidth [ 4] 0.0-10.0 sec 60.9 MBytes 50.9 Mbits/sec Ctrl+C클라이언트
windy@wl ~ $ iperf -c wl2 ------------------------------------------------------------ Client connecting to wl2, TCP port 5001 TCP window size: 48.0 KByte (default) ------------------------------------------------------------ [ 3] local x.x.x.x port 33019 connected with x.x.x.x port 5001 [ ID] Interval Transfer Bandwidth [ 3] 0.0-10.0 sec 60.9 MBytes 50.9 Mbits/sec
windy@wl2 ~ $ iperf -s -u ------------------------------------------------------------ Server listening on UDP port 5001 Receiving 1470 byte datagrams UDP buffer size: 56.0 KByte (default) ------------------------------------------------------------ [ 3] local x.x.x.x port 5001 connected with x.x.x.x port 2055 [ ID] Interval Transfer Bandwidth Jitter Lost/Total Datagrams [ 3] 0.0-10.0 sec 11.9 MBytes 10.0 Mbits/sec 0.264 ms 0/ 8505 (0%) Ctrl+C클라이언트
windy@wl ~ $ iperf -c wl2 -u -b 10M ------------------------------------------------------------ Client connecting to wl2, UDP port 5001 Sending 1470 byte datagrams UDP buffer size: 8.00 KByte (default) ------------------------------------------------------------ [1912] local x.x.x.x port 2055 connected with x.x.x.x port 5001 [ ID] Interval Transfer Bandwidth [1912] 0.0-10.0 sec 11.9 MBytes 9.99 Mbits/sec [1912] Server Report: [1912] 0.0-10.0 sec 11.9 MBytes 10.0 Mbits/sec 0.263 ms 0/ 8505 (0%) [1912] Sent 8505 datagramsIPerf 를 UDP 로 실행시키면, Jitter 와 Datagram Loss 를 측정한다. 이를 통해 회선 품질을 알 수 있다.
아래와 같이 소스를 받아 설치할 수 있다.
windy@wl ~/src $ wget https://downloads.es.net/pub/iperf/iperf-3.6.tar.gz windy@wl ~/src $ tar xvfz iperf-3.6.tar.gz windy@wl ~/src $ cd iperf-3.6 windy@wl ~/src/iperf-3.6 $ ./configure --with-openssl=/usr/local/ssl CFLAGS="-m64 -lsendfile" LDFLAGS="-m64" windy@wl ~/src/iperf-3.6 $ make windy@wl ~/src/iperf-3.6 $ make install
iperf3 -s [ options ]
iperf3 -c 서버IP [ options ]
-p, --port n 열거나 접속할 포트 번호 (기본값: 5201) -f, --format [kmgtKMGT] format to report: Kbits, Mbits, Gbits, Tbits -i, --interval n 출력 간격 (초). 기본값은 1, 0인경우 비활성화 -F, --file name 클라이언트: 임의의 데이터 대신 파일에서 읽어와 전송 서버: 네트워크에서 받은 데이터를 지정한 파일로 저장 -B, --bind host 지정한 인터페이스에 바인드 -V, --verbose 상세히 출력 -J, --json JSON 형식으로 출력 --logfile file 출력을 로그 파일로 전송 --forceflush force flushing output at every interval -d, --debug 디버그 정보 출력 -v, --version 버전 정보 보임 -h, --help 도움말
-s, --server 서버로 실행 -D, --daemon 서버 데몬으로 실행 -I, --pidfile file PID 파일 지정 -1, --one-off 한번의 클라이언트 접속만 허용한 후 종료 --rsa-private-key-path path to the RSA private key used to decrypt authentication credentials --authorized-users-path path to the configuration file containing user credentials
-c, --client host run in client mode, connecting to the specified server --sctp use SCTP rather than TCP (FreeBSD and Linux) -X, --xbind NAME bind SCTP association to links --nstreams no number of SCTP streams -u, --udp use UDP rather than TCP --connect-timeout # timeout for control connection setup (ms) -b, --bitrate #[KMG][/#] target bitrate in bits/sec (0 for unlimited) (default 1 Mbit/sec for UDP, unlimited for TCP) (optional slash and packet count for burst mode) --pacing-timer #[KMG] set the timing for pacing, in microseconds (default 1000) -t, --time n time in seconds to transmit for (default 10 secs) -n, --bytes n[KM] number of bytes to transmit (instead of -t) -k, --blockcount n[KM] number of blocks (packets) to transmit (instead of -t or -n) -l, --length n[KM] 읽기/쓰기 버퍼 지정 (기본값: TCP인경우 128KB, UDP인경우 8KB) --cport port bind data streams to a specific client port (for TCP and UDP only, default is to use an ephemeral port) -P, --parallel n number of parallel client streams to run -R, --reverse 역 모드 (서버가 보내고 클라이언트가 받음) -w, --window n[KM] window size / socket buffer size (this gets sent to the server and used on that side too) -C, --congestion algo set TCP congestion control algorithm (Linux and FreeBSD only) -M, --set-mss n TCP/SCTP 최대 세그먼트 크기 지정 (MTU - 40 bytes) -N, --no-delay TCP/SCTP 에 TCP_NODELAY 옵션 사용(Nagle 알고리즘 사용 하지 않음) -4, --version4 IPv4 만 사용 -6, --version6 IPv6 만 사용 -S, --tos n set the IP type of service --dscp N or --dscp val set the IP dscp value, either 0-63 or symbolic. Numeric values can be specified in decimal, octal and hex (see --tos above). -Z, --zerocopy 데이터 전송시 Zero Copy 방식을 사용. 예를 들어 write(2) 대신 sendfile(2)를 사용함 -O, --omit n Omit the first n seconds of the test, to skip past the TCP slow-start period. -T, --title str Prefix every output line with this string. --extra-data str data string to include in client and server JSON --get-server-output get results from server --udp-counters-64bit use 64-bit counters in UDP test packets --repeating-payload use repeating pattern in payload, instead of randomized payload (like in iperf2) --username username for authentication --rsa-public-key-path path to the RSA public key used to encrypt authentication credentials
windy@wl ~ $ iperf3 -s ----------------------------------------------------------- Server listening on 5201 ----------------------------------------------------------- Accepted connection from ::1, port 51234 [ 5] local ::1 port 5201 connected to ::1 port 55954 [ ID] Interval Transfer Bitrate Jitter Lost/Total Datagrams [ 5] 0.00-1.00 sec 136 KBytes 1.11 Mbits/sec 0.008 ms 0/17 (0%) [ 5] 1.00-2.00 sec 128 KBytes 1.05 Mbits/sec 0.016 ms 0/16 (0%) [ 5] 2.00-3.00 sec 128 KBytes 1.05 Mbits/sec 0.012 ms 0/16 (0%) [ 5] 3.00-4.00 sec 128 KBytes 1.05 Mbits/sec 0.012 ms 0/16 (0%) [ 5] 4.00-5.00 sec 128 KBytes 1.05 Mbits/sec 0.010 ms 0/16 (0%) [ 5] 5.00-6.00 sec 120 KBytes 982 Kbits/sec 0.016 ms 0/15 (0%) [ 5] 6.00-7.01 sec 128 KBytes 1.04 Mbits/sec 17.448 ms 0/16 (0%) [ 5] 7.01-8.00 sec 136 KBytes 1.12 Mbits/sec 5.830 ms 0/17 (0%) [ 5] 8.00-9.00 sec 128 KBytes 1.04 Mbits/sec 2.087 ms 0/16 (0%) [ 5] 9.00-10.00 sec 128 KBytes 1.05 Mbits/sec 0.751 ms 0/16 (0%) - - - - - - - - - - - - - - - - - - - - - - - - - [ ID] Interval Transfer Bitrate Jitter Lost/Total Datagrams [ 5] 0.00-10.00 sec 1.26 MBytes 1.05 Mbits/sec 0.751 ms 0/161 (0%) receiver ----------------------------------------------------------- Server listening on 5201 ----------------------------------------------------------- Ctrl+Ciperf3: interrupt - the server has terminated클라이언트측 호스트에서 아래와 같이 실행한다.
windy@wl ~ $ iperf3 -c localhost -u -Z Connecting to host localhost, port 5201 [ 6] local ::1 port 55954 connected to ::1 port 5201 [ ID] Interval Transfer Bitrate Total Datagrams [ 6] 0.00-1.00 sec 136 KBytes 1.11 Mbits/sec 17 [ 6] 1.00-2.00 sec 128 KBytes 1.05 Mbits/sec 16 [ 6] 2.00-3.00 sec 128 KBytes 1.05 Mbits/sec 16 [ 6] 3.00-4.00 sec 128 KBytes 1.05 Mbits/sec 16 [ 6] 4.00-5.00 sec 128 KBytes 1.05 Mbits/sec 16 [ 6] 5.00-6.01 sec 120 KBytes 971 Kbits/sec 15 [ 6] 6.01-7.02 sec 128 KBytes 1.04 Mbits/sec 16 [ 6] 7.02-8.00 sec 136 KBytes 1.13 Mbits/sec 17 [ 6] 8.00-9.01 sec 128 KBytes 1.04 Mbits/sec 16 [ 6] 9.01-10.00 sec 128 KBytes 1.06 Mbits/sec 16 - - - - - - - - - - - - - - - - - - - - - - - - - [ ID] Interval Transfer Bitrate Jitter Lost/Total Datagrams [ 6] 0.00-10.00 sec 1.26 MBytes 1.05 Mbits/sec 0.000 ms 0/161 (0%) sender [ 6] 0.00-10.00 sec 1.26 MBytes 1.05 Mbits/sec 0.751 ms 0/161 (0%) receiver iperf Done.
root@wl ~/src # wget https://www.gropp.org/bwm-ng/bwm-ng-0.6.1.tar.gz root@wl ~/src # tar xvfz bwm-ng-0.6.1.tar.gz root@wl ~/src # cd bwm-ng-0.6.1 root@wl ~/src/bwm-ng-0.6.1 # CC=/usr/sfw/bin/gcc ./configure root@wl ~/src/bwm-ng-0.6.1 # make root@wl ~/src/bwm-ng-0.6.1 # make install
root@wl ~ # bwm-ng bwm-ng v0.6.1 (probing every 0.500s), press 'h' for help input: kstat type: rate | iface Rx Tx Total ============================================================================== gani0: 0.00 KB/s 0.00 KB/s 0.00 KB/s iprb0: 1.58 KB/s 26.75 KB/s 28.34 KB/s vboxnet0: 0.00 KB/s 0.00 KB/s 0.00 KB/s ------------------------------------------------------------------------------ total: 1.58 KB/s 26.75 KB/s 28.34 KB/s root@wl ~ # bwm-ng -i kstatdisk bwm-ng v0.6.1 (probing every 0.500s), press 'h' for help input: kstatdisk type: rate | iface Rx Tx Total ============================================================================== sd0: 0.00 KB/s 0.00 KB/s 0.00 KB/s sd0,a: 0.00 KB/s 0.00 KB/s 0.00 KB/s ------------------------------------------------------------------------------ total: 0.00 KB/s 0.00 KB/s 0.00 KB/s
root@wl ~/src # wget http://www.mirrorservice.org/pub/i-scream/libstatgrab/libstatgrab-0.91.tar.gz root@wl ~/src # tar xvfz libstatgrab-0.91.tar.gz root@wl ~/src # cd libstatgrab-0.91 root@wl ~/src/libstatgrab-0.91 # ./configure root@wl ~/src/libstatgrab-0.91 # make root@wl ~/src/libstatgrab-0.91 # make install
root@wl ~ # saidar Hostname : wl Uptime : 16d 16:57:50 Date : 2015-01-01 00:00:00 Load 1 : 0.13 CPU Idle : 99.50% Running : 1 Zombie : 0 Load 5 : 0.21 CPU System: 0.50% Sleeping : 77 Total : 79 Load 15 : 0.24 CPU User : 0.00% Stopped : 1 No. Users : 1 Mem Total : 3966M Swap Total: 4095M Mem Used : 94.95% Paging in : 0 Mem Used : 3766M Swap Used : 1524K Swap Used : 0.04% Paging out: 0 Mem Free : 200M Swap Free : 4094M Total Used: 46.73% Disk Name Read Write Network Interface rx tx c0t0d0s0 0B 0B elxl0 0B 0B iprb0 0B 0B Total 0B 0B vboxnet0 0B 0B Mount Point Free Used / 100898M 0.00% /devices 0B - ...
RSS ATOM XHTML 5 CSS3 |
Copyright © 2004-2023 Jo HoSeok. All rights reserved. |