読者です 読者をやめる 読者になる 読者になる

ぼくの技術日誌

日誌って銘打っていますが、更新頻度が…

iperf3をARM Linux向けにビルドして通信速度を測定する

はじめに

iperf3は通信速度を測定するオープンソースソフトウェアです。
ARM LinuxというかZynqのPetaLinuxで使ってみたので、作業手順を忘れないようにまとめておきます。
#手順自体はRaspberry PiやBeagleBoneなど他のARM Linuxでも変わらないはず。


この記事の実行環境は下記のとおりです。

iperf3のビルド

ターゲット向けのビルド・インストール

ソースコードのtarボールをダウンロードします。

root@yosuke-vm:~$ wget http://downloads.es.net/pub/iperf/iperf-3.1.2.tar.gz

ダウンロード後、

root@yosuke-vm:/home/yosuke/workspace/iperf-3.1.2# ./configure --host=arm-linux CC=arm-xilinx-linux-gnueabi-gcc CXX=arm-xilinx-gnueabi-g++ CFLAGS=-static CXXFLAGS=-static
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for arm-linux-strip... no
checking for strip... strip
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking build system type... x86_64-unknown-linux-gnu
checking host system type... arm-unknown-linux-gnu
checking for arm-linux-gcc... arm-xilinx-linux-gnueabi-gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... yes
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether arm-xilinx-linux-gnueabi-gcc accepts -g... yes
checking for arm-xilinx-linux-gnueabi-gcc option to accept ISO C89... none needed
checking whether arm-xilinx-linux-gnueabi-gcc understands -c and -o together... yes
checking for style of include used by make... GNU
checking dependency style of arm-xilinx-linux-gnueabi-gcc... gcc3
checking for arm-linux-ranlib... no
checking for ranlib... ranlib
configure: WARNING: using cross tools not prefixed with host triplet
checking whether ln -s works... yes
checking how to print strings... printf
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by arm-xilinx-linux-gnueabi-gcc... /opt/Petalinux/petalinux-v2015.4-final/tools/linux-i386/arm-xilinx-linux-gnueabi/arm-xilinx-linux-gnueabi/bin/ld
checking if the linker (/opt/Petalinux/petalinux-v2015.4-final/tools/linux-i386/arm-xilinx-linux-gnueabi/arm-xilinx-linux-gnueabi/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... no
checking for arm-linux-dumpbin... no
checking for arm-linux-link... no
checking for dumpbin... no
checking for link... link -dump
checking the name lister (nm) interface... BSD nm
checking the maximum length of command line arguments... 1572864
checking how to convert x86_64-unknown-linux-gnu file names to arm-unknown-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /opt/Petalinux/petalinux-v2015.4-final/tools/linux-i386/arm-xilinx-linux-gnueabi/arm-xilinx-linux-gnueabi/bin/ld option to reload object files... -r
checking for arm-linux-objdump... no
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for arm-linux-dlltool... no
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for arm-linux-ar... no
checking for ar... ar
checking for archiver @FILE support... @
checking for arm-linux-strip... strip
checking for arm-linux-ranlib... ranlib
checking command to parse nm output from arm-xilinx-linux-gnueabi-gcc object... ok
checking for sysroot... no
checking for a working dd... /bin/dd
checking how to truncate binary pipes... /bin/dd bs=4096 count=1
checking for arm-linux-mt... no
checking for mt... mt
checking if mt is a manifest tool... no
checking how to run the C preprocessor... arm-xilinx-linux-gnueabi-gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if arm-xilinx-linux-gnueabi-gcc supports -fno-rtti -fno-exceptions... no
checking for arm-xilinx-linux-gnueabi-gcc option to produce PIC... -fPIC -DPIC
checking if arm-xilinx-linux-gnueabi-gcc PIC flag -fPIC -DPIC works... yes
checking if arm-xilinx-linux-gnueabi-gcc static flag -static works... yes
checking if arm-xilinx-linux-gnueabi-gcc supports -c -o file.o... yes
checking if arm-xilinx-linux-gnueabi-gcc supports -c -o file.o... (cached) yes
checking whether the arm-xilinx-linux-gnueabi-gcc linker (/opt/Petalinux/petalinux-v2015.4-final/tools/linux-i386/arm-xilinx-linux-gnueabi/arm-xilinx-linux-gnueabi/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for ANSI C header files... (cached) yes
checking for library containing nanosleep... none required
checking for library containing hstrerror... none required
checking for library containing socket... none required
checking for library containing inet_ntop... none required
checking for an ANSI C-conforming const... yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking for netinet/sctp.h... no
checking TCP_CONGESTION socket option... yes
checking IPv6 flowlabel support... yes
checking for cpuset_setaffinity... no
checking for sched_setaffinity... yes
checking for sendfile... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating src/version.h
config.status: creating examples/Makefile
config.status: creating iperf3.spec
config.status: creating src/iperf_config.h
config.status: src/iperf_config.h is unchanged
config.status: executing depfiles commands
config.status: executing libtool commands
root@yosuke-vm:/home/yosuke/workspace/iperf-3.1.2#

ビルドを実行

root@yosuke-vm:/home/yosuke/workspace/iperf-3.1.2# make ARCH=armMaking all in src
make[1]: ディレクトリ `/home/yosuke/workspace/iperf-3.1.2/src' に入ります
make  all-am
make[2]: ディレクトリ `/home/yosuke/workspace/iperf-3.1.2/src' に入ります
/bin/sh ../libtool  --tag=CC   --mode=compile arm-xilinx-linux-gnueabi-gcc -DHAVE_CONFIG_H -I.     -static -Wall -MT cjson.lo -MD -MP -MF .deps/cjson.Tpo -c -o cjson.lo cjson.c
libtool: compile:  arm-xilinx-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -Wall -MT cjson.lo -MD -MP -MF .deps/cjson.Tpo -c cjson.c -o cjson.o
mv -f .deps/cjson.Tpo .deps/cjson.Plo
/bin/sh ../libtool  --tag=CC   --mode=compile arm-xilinx-linux-gnueabi-gcc -DHAVE_CONFIG_H -I.     -static -Wall -MT iperf_api.lo -MD -MP -MF .deps/iperf_api.Tpo -c -o iperf_api.lo iperf_api.c
libtool: compile:  arm-xilinx-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -Wall -MT iperf_api.lo -MD -MP -MF .deps/iperf_api.Tpo -c iperf_api.c -o iperf_api.o
mv -f .deps/iperf_api.Tpo .deps/iperf_api.Plo
/bin/sh ../libtool  --tag=CC   --mode=compile arm-xilinx-linux-gnueabi-gcc -DHAVE_CONFIG_H -I.     -static -Wall -MT iperf_error.lo -MD -MP -MF .deps/iperf_error.Tpo -c -o iperf_error.lo iperf_error.c
libtool: compile:  arm-xilinx-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -Wall -MT iperf_error.lo -MD -MP -MF .deps/iperf_error.Tpo -c iperf_error.c -o iperf_error.o
mv -f .deps/iperf_error.Tpo .deps/iperf_error.Plo
/bin/sh ../libtool  --tag=CC   --mode=compile arm-xilinx-linux-gnueabi-gcc -DHAVE_CONFIG_H -I.     -static -Wall -MT iperf_client_api.lo -MD -MP -MF .deps/iperf_client_api.Tpo -c -o iperf_client_api.lo iperf_client_api.c
libtool: compile:  arm-xilinx-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -Wall -MT iperf_client_api.lo -MD -MP -MF .deps/iperf_client_api.Tpo -c iperf_client_api.c -o iperf_client_api.o
mv -f .deps/iperf_client_api.Tpo .deps/iperf_client_api.Plo
/bin/sh ../libtool  --tag=CC   --mode=compile arm-xilinx-linux-gnueabi-gcc -DHAVE_CONFIG_H -I.     -static -Wall -MT iperf_locale.lo -MD -MP -MF .deps/iperf_locale.Tpo -c -o iperf_locale.lo iperf_locale.c
libtool: compile:  arm-xilinx-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -Wall -MT iperf_locale.lo -MD -MP -MF .deps/iperf_locale.Tpo -c iperf_locale.c -o iperf_locale.o
mv -f .deps/iperf_locale.Tpo .deps/iperf_locale.Plo
/bin/sh ../libtool  --tag=CC   --mode=compile arm-xilinx-linux-gnueabi-gcc -DHAVE_CONFIG_H -I.     -static -Wall -MT iperf_server_api.lo -MD -MP -MF .deps/iperf_server_api.Tpo -c -o iperf_server_api.lo iperf_server_api.c
libtool: compile:  arm-xilinx-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -Wall -MT iperf_server_api.lo -MD -MP -MF .deps/iperf_server_api.Tpo -c iperf_server_api.c -o iperf_server_api.o
mv -f .deps/iperf_server_api.Tpo .deps/iperf_server_api.Plo
/bin/sh ../libtool  --tag=CC   --mode=compile arm-xilinx-linux-gnueabi-gcc -DHAVE_CONFIG_H -I.     -static -Wall -MT iperf_tcp.lo -MD -MP -MF .deps/iperf_tcp.Tpo -c -o iperf_tcp.lo iperf_tcp.c
libtool: compile:  arm-xilinx-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -Wall -MT iperf_tcp.lo -MD -MP -MF .deps/iperf_tcp.Tpo -c iperf_tcp.c -o iperf_tcp.o
mv -f .deps/iperf_tcp.Tpo .deps/iperf_tcp.Plo
/bin/sh ../libtool  --tag=CC   --mode=compile arm-xilinx-linux-gnueabi-gcc -DHAVE_CONFIG_H -I.     -static -Wall -MT iperf_udp.lo -MD -MP -MF .deps/iperf_udp.Tpo -c -o iperf_udp.lo iperf_udp.c
libtool: compile:  arm-xilinx-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -Wall -MT iperf_udp.lo -MD -MP -MF .deps/iperf_udp.Tpo -c iperf_udp.c -o iperf_udp.o
iperf_udp.c: In function 'iperf_udp_recv':
iperf_udp.c:107:2: warning: format '%zu' expects argument of type 'size_t', but argument 3 has type 'uint64_t' [-Wformat=]
  iperf_err(sp->test, "OUT OF ORDER - incoming packet = %zu and received packet = %d AND SP = %d", pcount, sp->packet_count, sp->socket);
  ^
mv -f .deps/iperf_udp.Tpo .deps/iperf_udp.Plo
/bin/sh ../libtool  --tag=CC   --mode=compile arm-xilinx-linux-gnueabi-gcc -DHAVE_CONFIG_H -I.     -static -Wall -MT iperf_sctp.lo -MD -MP -MF .deps/iperf_sctp.Tpo -c -o iperf_sctp.lo iperf_sctp.c
libtool: compile:  arm-xilinx-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -Wall -MT iperf_sctp.lo -MD -MP -MF .deps/iperf_sctp.Tpo -c iperf_sctp.c -o iperf_sctp.o
mv -f .deps/iperf_sctp.Tpo .deps/iperf_sctp.Plo
/bin/sh ../libtool  --tag=CC   --mode=compile arm-xilinx-linux-gnueabi-gcc -DHAVE_CONFIG_H -I.     -static -Wall -MT iperf_util.lo -MD -MP -MF .deps/iperf_util.Tpo -c -o iperf_util.lo iperf_util.c
libtool: compile:  arm-xilinx-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -Wall -MT iperf_util.lo -MD -MP -MF .deps/iperf_util.Tpo -c iperf_util.c -o iperf_util.o
mv -f .deps/iperf_util.Tpo .deps/iperf_util.Plo
/bin/sh ../libtool  --tag=CC   --mode=compile arm-xilinx-linux-gnueabi-gcc -DHAVE_CONFIG_H -I.     -static -Wall -MT net.lo -MD -MP -MF .deps/net.Tpo -c -o net.lo net.c
libtool: compile:  arm-xilinx-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -Wall -MT net.lo -MD -MP -MF .deps/net.Tpo -c net.c -o net.o
mv -f .deps/net.Tpo .deps/net.Plo
/bin/sh ../libtool  --tag=CC   --mode=compile arm-xilinx-linux-gnueabi-gcc -DHAVE_CONFIG_H -I.     -static -Wall -MT tcp_info.lo -MD -MP -MF .deps/tcp_info.Tpo -c -o tcp_info.lo tcp_info.c
libtool: compile:  arm-xilinx-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -Wall -MT tcp_info.lo -MD -MP -MF .deps/tcp_info.Tpo -c tcp_info.c -o tcp_info.o
mv -f .deps/tcp_info.Tpo .deps/tcp_info.Plo
/bin/sh ../libtool  --tag=CC   --mode=compile arm-xilinx-linux-gnueabi-gcc -DHAVE_CONFIG_H -I.     -static -Wall -MT tcp_window_size.lo -MD -MP -MF .deps/tcp_window_size.Tpo -c -o tcp_window_size.lo tcp_window_size.c
libtool: compile:  arm-xilinx-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -Wall -MT tcp_window_size.lo -MD -MP -MF .deps/tcp_window_size.Tpo -c tcp_window_size.c -o tcp_window_size.o
mv -f .deps/tcp_window_size.Tpo .deps/tcp_window_size.Plo
/bin/sh ../libtool  --tag=CC   --mode=compile arm-xilinx-linux-gnueabi-gcc -DHAVE_CONFIG_H -I.     -static -Wall -MT timer.lo -MD -MP -MF .deps/timer.Tpo -c -o timer.lo timer.c
libtool: compile:  arm-xilinx-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -Wall -MT timer.lo -MD -MP -MF .deps/timer.Tpo -c timer.c -o timer.o
mv -f .deps/timer.Tpo .deps/timer.Plo
/bin/sh ../libtool  --tag=CC   --mode=compile arm-xilinx-linux-gnueabi-gcc -DHAVE_CONFIG_H -I.     -static -Wall -MT units.lo -MD -MP -MF .deps/units.Tpo -c -o units.lo units.c
libtool: compile:  arm-xilinx-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -Wall -MT units.lo -MD -MP -MF .deps/units.Tpo -c units.c -o units.o
mv -f .deps/units.Tpo .deps/units.Plo
/bin/sh ../libtool  --tag=CC   --mode=link arm-xilinx-linux-gnueabi-gcc  -static -Wall   -o libiperf.la -rpath /usr/local/lib cjson.lo iperf_api.lo iperf_error.lo iperf_client_api.lo iperf_locale.lo iperf_server_api.lo iperf_tcp.lo iperf_udp.lo iperf_sctp.lo iperf_util.lo net.lo tcp_info.lo tcp_window_size.lo timer.lo units.lo
libtool: link: ar cru .libs/libiperf.a  cjson.o iperf_api.o iperf_error.o iperf_client_api.o iperf_locale.o iperf_server_api.o iperf_tcp.o iperf_udp.o iperf_sctp.o iperf_util.o net.o tcp_info.o tcp_window_size.o timer.o units.o
libtool: link: ranlib .libs/libiperf.a
libtool: link: ( cd ".libs" && rm -f "libiperf.la" && ln -s "../libiperf.la" "libiperf.la" )
arm-xilinx-linux-gnueabi-gcc -DHAVE_CONFIG_H -I.    -g -static -Wall -MT iperf3-main.o -MD -MP -MF .deps/iperf3-main.Tpo -c -o iperf3-main.o `test -f 'main.c' || echo './'`main.c
mv -f .deps/iperf3-main.Tpo .deps/iperf3-main.Po
/bin/sh ../libtool  --tag=CC   --mode=link arm-xilinx-linux-gnueabi-gcc -g -static -Wall -g  -o iperf3 iperf3-main.o libiperf.la
libtool: link: arm-xilinx-linux-gnueabi-gcc -g -Wall -g -o iperf3 iperf3-main.o  ./.libs/libiperf.a
arm-xilinx-linux-gnueabi-gcc -DHAVE_CONFIG_H -I.    -g -static -Wall -MT t_timer-t_timer.o -MD -MP -MF .deps/t_timer-t_timer.Tpo -c -o t_timer-t_timer.o `test -f 't_timer.c' || echo './'`t_timer.c
mv -f .deps/t_timer-t_timer.Tpo .deps/t_timer-t_timer.Po
/bin/sh ../libtool  --tag=CC   --mode=link arm-xilinx-linux-gnueabi-gcc -g -static -Wall   -o t_timer t_timer-t_timer.o libiperf.la
libtool: link: arm-xilinx-linux-gnueabi-gcc -g -Wall -o t_timer t_timer-t_timer.o  ./.libs/libiperf.a
arm-xilinx-linux-gnueabi-gcc -DHAVE_CONFIG_H -I.    -g -static -Wall -MT t_units-t_units.o -MD -MP -MF .deps/t_units-t_units.Tpo -c -o t_units-t_units.o `test -f 't_units.c' || echo './'`t_units.c
mv -f .deps/t_units-t_units.Tpo .deps/t_units-t_units.Po
/bin/sh ../libtool  --tag=CC   --mode=link arm-xilinx-linux-gnueabi-gcc -g -static -Wall   -o t_units t_units-t_units.o libiperf.la
libtool: link: arm-xilinx-linux-gnueabi-gcc -g -Wall -o t_units t_units-t_units.o  ./.libs/libiperf.a
arm-xilinx-linux-gnueabi-gcc -DHAVE_CONFIG_H -I.    -g -static -Wall -MT t_uuid-t_uuid.o -MD -MP -MF .deps/t_uuid-t_uuid.Tpo -c -o t_uuid-t_uuid.o `test -f 't_uuid.c' || echo './'`t_uuid.c
mv -f .deps/t_uuid-t_uuid.Tpo .deps/t_uuid-t_uuid.Po
/bin/sh ../libtool  --tag=CC   --mode=link arm-xilinx-linux-gnueabi-gcc -g -static -Wall   -o t_uuid t_uuid-t_uuid.o libiperf.la
libtool: link: arm-xilinx-linux-gnueabi-gcc -g -Wall -o t_uuid t_uuid-t_uuid.o  ./.libs/libiperf.a
arm-xilinx-linux-gnueabi-gcc -DHAVE_CONFIG_H -I.    -pg -g -static -Wall -MT iperf3_profile-main.o -MD -MP -MF .deps/iperf3_profile-main.Tpo -c -o iperf3_profile-main.o `test -f 'main.c' || echo './'`main.c
mv -f .deps/iperf3_profile-main.Tpo .deps/iperf3_profile-main.Po
arm-xilinx-linux-gnueabi-gcc -DHAVE_CONFIG_H -I.    -pg -g -static -Wall -MT iperf3_profile-cjson.o -MD -MP -MF .deps/iperf3_profile-cjson.Tpo -c -o iperf3_profile-cjson.o `test -f 'cjson.c' || echo './'`cjson.c
mv -f .deps/iperf3_profile-cjson.Tpo .deps/iperf3_profile-cjson.Po
arm-xilinx-linux-gnueabi-gcc -DHAVE_CONFIG_H -I.    -pg -g -static -Wall -MT iperf3_profile-iperf_api.o -MD -MP -MF .deps/iperf3_profile-iperf_api.Tpo -c -o iperf3_profile-iperf_api.o `test -f 'iperf_api.c' || echo './'`iperf_api.c
mv -f .deps/iperf3_profile-iperf_api.Tpo .deps/iperf3_profile-iperf_api.Po
arm-xilinx-linux-gnueabi-gcc -DHAVE_CONFIG_H -I.    -pg -g -static -Wall -MT iperf3_profile-iperf_error.o -MD -MP -MF .deps/iperf3_profile-iperf_error.Tpo -c -o iperf3_profile-iperf_error.o `test -f 'iperf_error.c' || echo './'`iperf_error.c
mv -f .deps/iperf3_profile-iperf_error.Tpo .deps/iperf3_profile-iperf_error.Po
arm-xilinx-linux-gnueabi-gcc -DHAVE_CONFIG_H -I.    -pg -g -static -Wall -MT iperf3_profile-iperf_client_api.o -MD -MP -MF .deps/iperf3_profile-iperf_client_api.Tpo -c -o iperf3_profile-iperf_client_api.o `test -f 'iperf_client_api.c' || echo './'`iperf_client_api.c
mv -f .deps/iperf3_profile-iperf_client_api.Tpo .deps/iperf3_profile-iperf_client_api.Po
arm-xilinx-linux-gnueabi-gcc -DHAVE_CONFIG_H -I.    -pg -g -static -Wall -MT iperf3_profile-iperf_locale.o -MD -MP -MF .deps/iperf3_profile-iperf_locale.Tpo -c -o iperf3_profile-iperf_locale.o `test -f 'iperf_locale.c' || echo './'`iperf_locale.c
mv -f .deps/iperf3_profile-iperf_locale.Tpo .deps/iperf3_profile-iperf_locale.Po
arm-xilinx-linux-gnueabi-gcc -DHAVE_CONFIG_H -I.    -pg -g -static -Wall -MT iperf3_profile-iperf_server_api.o -MD -MP -MF .deps/iperf3_profile-iperf_server_api.Tpo -c -o iperf3_profile-iperf_server_api.o `test -f 'iperf_server_api.c' || echo './'`iperf_server_api.c
mv -f .deps/iperf3_profile-iperf_server_api.Tpo .deps/iperf3_profile-iperf_server_api.Po
arm-xilinx-linux-gnueabi-gcc -DHAVE_CONFIG_H -I.    -pg -g -static -Wall -MT iperf3_profile-iperf_tcp.o -MD -MP -MF .deps/iperf3_profile-iperf_tcp.Tpo -c -o iperf3_profile-iperf_tcp.o `test -f 'iperf_tcp.c' || echo './'`iperf_tcp.c
mv -f .deps/iperf3_profile-iperf_tcp.Tpo .deps/iperf3_profile-iperf_tcp.Po
arm-xilinx-linux-gnueabi-gcc -DHAVE_CONFIG_H -I.    -pg -g -static -Wall -MT iperf3_profile-iperf_udp.o -MD -MP -MF .deps/iperf3_profile-iperf_udp.Tpo -c -o iperf3_profile-iperf_udp.o `test -f 'iperf_udp.c' || echo './'`iperf_udp.c
iperf_udp.c: In function 'iperf_udp_recv':
iperf_udp.c:107:2: warning: format '%zu' expects argument of type 'size_t', but argument 3 has type 'uint64_t' [-Wformat=]
  iperf_err(sp->test, "OUT OF ORDER - incoming packet = %zu and received packet = %d AND SP = %d", pcount, sp->packet_count, sp->socket);
  ^
mv -f .deps/iperf3_profile-iperf_udp.Tpo .deps/iperf3_profile-iperf_udp.Po
arm-xilinx-linux-gnueabi-gcc -DHAVE_CONFIG_H -I.    -pg -g -static -Wall -MT iperf3_profile-iperf_sctp.o -MD -MP -MF .deps/iperf3_profile-iperf_sctp.Tpo -c -o iperf3_profile-iperf_sctp.o `test -f 'iperf_sctp.c' || echo './'`iperf_sctp.c
mv -f .deps/iperf3_profile-iperf_sctp.Tpo .deps/iperf3_profile-iperf_sctp.Po
arm-xilinx-linux-gnueabi-gcc -DHAVE_CONFIG_H -I.    -pg -g -static -Wall -MT iperf3_profile-iperf_util.o -MD -MP -MF .deps/iperf3_profile-iperf_util.Tpo -c -o iperf3_profile-iperf_util.o `test -f 'iperf_util.c' || echo './'`iperf_util.c
mv -f .deps/iperf3_profile-iperf_util.Tpo .deps/iperf3_profile-iperf_util.Po
arm-xilinx-linux-gnueabi-gcc -DHAVE_CONFIG_H -I.    -pg -g -static -Wall -MT iperf3_profile-net.o -MD -MP -MF .deps/iperf3_profile-net.Tpo -c -o iperf3_profile-net.o `test -f 'net.c' || echo './'`net.c
mv -f .deps/iperf3_profile-net.Tpo .deps/iperf3_profile-net.Po
arm-xilinx-linux-gnueabi-gcc -DHAVE_CONFIG_H -I.    -pg -g -static -Wall -MT iperf3_profile-tcp_info.o -MD -MP -MF .deps/iperf3_profile-tcp_info.Tpo -c -o iperf3_profile-tcp_info.o `test -f 'tcp_info.c' || echo './'`tcp_info.c
mv -f .deps/iperf3_profile-tcp_info.Tpo .deps/iperf3_profile-tcp_info.Po
arm-xilinx-linux-gnueabi-gcc -DHAVE_CONFIG_H -I.    -pg -g -static -Wall -MT iperf3_profile-tcp_window_size.o -MD -MP -MF .deps/iperf3_profile-tcp_window_size.Tpo -c -o iperf3_profile-tcp_window_size.o `test -f 'tcp_window_size.c' || echo './'`tcp_window_size.c
mv -f .deps/iperf3_profile-tcp_window_size.Tpo .deps/iperf3_profile-tcp_window_size.Po
arm-xilinx-linux-gnueabi-gcc -DHAVE_CONFIG_H -I.    -pg -g -static -Wall -MT iperf3_profile-timer.o -MD -MP -MF .deps/iperf3_profile-timer.Tpo -c -o iperf3_profile-timer.o `test -f 'timer.c' || echo './'`timer.c
mv -f .deps/iperf3_profile-timer.Tpo .deps/iperf3_profile-timer.Po
arm-xilinx-linux-gnueabi-gcc -DHAVE_CONFIG_H -I.    -pg -g -static -Wall -MT iperf3_profile-units.o -MD -MP -MF .deps/iperf3_profile-units.Tpo -c -o iperf3_profile-units.o `test -f 'units.c' || echo './'`units.c
mv -f .deps/iperf3_profile-units.Tpo .deps/iperf3_profile-units.Po
/bin/sh ../libtool  --tag=CC   --mode=link arm-xilinx-linux-gnueabi-gcc -pg -g -static -Wall -pg -g  -o iperf3_profile iperf3_profile-main.o iperf3_profile-cjson.o iperf3_profile-iperf_api.o iperf3_profile-iperf_error.o iperf3_profile-iperf_client_api.o iperf3_profile-iperf_locale.o iperf3_profile-iperf_server_api.o iperf3_profile-iperf_tcp.o iperf3_profile-iperf_udp.o iperf3_profile-iperf_sctp.o iperf3_profile-iperf_util.o iperf3_profile-net.o iperf3_profile-tcp_info.o iperf3_profile-tcp_window_size.o iperf3_profile-timer.o iperf3_profile-units.o libiperf.la
libtool: link: arm-xilinx-linux-gnueabi-gcc -pg -g -Wall -pg -g -o iperf3_profile iperf3_profile-main.o iperf3_profile-cjson.o iperf3_profile-iperf_api.o iperf3_profile-iperf_error.o iperf3_profile-iperf_client_api.o iperf3_profile-iperf_locale.o iperf3_profile-iperf_server_api.o iperf3_profile-iperf_tcp.o iperf3_profile-iperf_udp.o iperf3_profile-iperf_sctp.o iperf3_profile-iperf_util.o iperf3_profile-net.o iperf3_profile-tcp_info.o iperf3_profile-tcp_window_size.o iperf3_profile-timer.o iperf3_profile-units.o  ./.libs/libiperf.a
make[2]: ディレクトリ `/home/yosuke/workspace/iperf-3.1.2/src' から出ます
make[1]: ディレクトリ `/home/yosuke/workspace/iperf-3.1.2/src' から出ます
Making all in examples
make[1]: ディレクトリ `/home/yosuke/workspace/iperf-3.1.2/examples' に入ります
arm-xilinx-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../src  -I../src  -g -static -Wall -MT mic-mic.o -MD -MP -MF .deps/mic-mic.Tpo -c -o mic-mic.o `test -f 'mic.c' || echo './'`mic.c
mv -f .deps/mic-mic.Tpo .deps/mic-mic.Po
/bin/sh ../libtool  --tag=CC   --mode=link arm-xilinx-linux-gnueabi-gcc -g -static -Wall -g  -o mic mic-mic.o ../src/libiperf.la
libtool: link: arm-xilinx-linux-gnueabi-gcc -g -Wall -g -o mic mic-mic.o  ../src/.libs/libiperf.a
arm-xilinx-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../src  -I../src  -g -static -Wall -MT mis-mis.o -MD -MP -MF .deps/mis-mis.Tpo -c -o mis-mis.o `test -f 'mis.c' || echo './'`mis.c
mv -f .deps/mis-mis.Tpo .deps/mis-mis.Po
/bin/sh ../libtool  --tag=CC   --mode=link arm-xilinx-linux-gnueabi-gcc -g -static -Wall -g  -o mis mis-mis.o ../src/libiperf.la
libtool: link: arm-xilinx-linux-gnueabi-gcc -g -Wall -g -o mis mis-mis.o  ../src/.libs/libiperf.a
make[1]: ディレクトリ `/home/yosuke/workspace/iperf-3.1.2/examples' から出ます
make[1]: ディレクトリ `/home/yosuke/workspace/iperf-3.1.2' に入ります
make[1]: `all-am' に対して行うべき事はありません.
make[1]: ディレクトリ `/home/yosuke/workspace/iperf-3.1.2' から出ます
root@yosuke-vm:/home/yosuke/workspace/iperf-3.1.2# 

ARM向けにビルドができていることがわかります。

root@yosuke-vm:/home/yosuke/workspace/iperf-3.1.2# ls src/iperf3
src/iperf3
root@yosuke-vm:/home/yosuke/workspace/iperf-3.1.2# readelf -h ./src/iperf3
ELF ヘッダ:
  マジック:   7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00
  クラス:                            ELF32
  データ:                            2 の補数、リトルエンディアン
  バージョン:                        1 (current)
  OS/ABI:                            UNIX - System V
  ABI バージョン:                    0
  型:                                EXEC (実行可能ファイル)
  マシン:                            ARM
  バージョン:                        0x1
  エントリポイントアドレス:               0x9718
  プログラムの開始ヘッダ:          52 (バイト)
  セクションヘッダ始点:          126160 (バイト)
  フラグ:                            0x5000202, has entry point, Version5 EABI, soft-float ABI
  このヘッダのサイズ:                52 (バイト)
  プログラムヘッダサイズ:            32 (バイト)
  プログラムヘッダ数:                8
  セクションヘッダ:                  40 (バイト)
  セクションヘッダサイズ:            36
  セクションヘッダ文字列表索引:      33
root@yosuke-vm:/home/yosuke/workspace/iperf-3.1.2#

PC Linux向けのビルド・インストール

yosuke@yosuke-vm:~/workspace/iperf-3.1.2$ ./configure 
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking for ranlib... ranlib
checking whether ln -s works... yes
checking how to print strings... printf
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking the maximum length of command line arguments... 1572864
checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... (cached) ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /bin/dd
checking how to truncate binary pipes... /bin/dd bs=4096 count=1
checking for mt... mt
checking if mt is a manifest tool... no
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for ANSI C header files... (cached) yes
checking for library containing nanosleep... none required
checking for library containing hstrerror... none required
checking for library containing socket... none required
checking for library containing inet_ntop... none required
checking for an ANSI C-conforming const... yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking for netinet/sctp.h... no
checking TCP_CONGESTION socket option... yes
checking IPv6 flowlabel support... yes
checking for cpuset_setaffinity... no
checking for sched_setaffinity... yes
checking for sendfile... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating src/version.h
config.status: creating examples/Makefile
config.status: creating iperf3.spec
config.status: creating src/iperf_config.h
config.status: src/iperf_config.h is unchanged
config.status: executing depfiles commands
config.status: executing libtool commands
yosuke@yosuke-vm:~/workspace/iperf-3.1.2$ make
Making all in src
make[1]: ディレクトリ `/home/yosuke/workspace/iperf-3.1.2/src' に入ります
make  all-am
make[2]: ディレクトリ `/home/yosuke/workspace/iperf-3.1.2/src' に入ります
/bin/sh ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I.     -g -O2 -Wall -MT cjson.lo -MD -MP -MF .deps/cjson.Tpo -c -o cjson.lo cjson.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -g -O2 -Wall -MT cjson.lo -MD -MP -MF .deps/cjson.Tpo -c cjson.c  -fPIC -DPIC -o .libs/cjson.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -g -O2 -Wall -MT cjson.lo -MD -MP -MF .deps/cjson.Tpo -c cjson.c -o cjson.o >/dev/null 2>&1
mv -f .deps/cjson.Tpo .deps/cjson.Plo
/bin/sh ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I.     -g -O2 -Wall -MT iperf_api.lo -MD -MP -MF .deps/iperf_api.Tpo -c -o iperf_api.lo iperf_api.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -g -O2 -Wall -MT iperf_api.lo -MD -MP -MF .deps/iperf_api.Tpo -c iperf_api.c  -fPIC -DPIC -o .libs/iperf_api.o
iperf_api.c: In function ‘diskfile_recv’:
iperf_api.c:2804:2: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
  (void) write(sp->diskfile_fd, sp->buffer, r);
  ^
iperf_api.c: In function ‘iperf_reporter_callback’:
iperf_api.c:2445:10: warning: ‘end_time’ may be used uninitialized in this function [-Wmaybe-uninitialized]
   iprintf(test, report_sum_bw_udp_format, start_time, end_time, ubuf, nbuf, avg_jitter * 1000.0, lost_packets, total_packets, lost_percent, "");
          ^
iperf_api.c:2280:24: note: ‘end_time’ was declared here
     double start_time, end_time, avg_jitter = 0.0, lost_percent;
                        ^
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -g -O2 -Wall -MT iperf_api.lo -MD -MP -MF .deps/iperf_api.Tpo -c iperf_api.c -o iperf_api.o >/dev/null 2>&1
mv -f .deps/iperf_api.Tpo .deps/iperf_api.Plo
/bin/sh ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I.     -g -O2 -Wall -MT iperf_error.lo -MD -MP -MF .deps/iperf_error.Tpo -c -o iperf_error.lo iperf_error.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -g -O2 -Wall -MT iperf_error.lo -MD -MP -MF .deps/iperf_error.Tpo -c iperf_error.c  -fPIC -DPIC -o .libs/iperf_error.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -g -O2 -Wall -MT iperf_error.lo -MD -MP -MF .deps/iperf_error.Tpo -c iperf_error.c -o iperf_error.o >/dev/null 2>&1
mv -f .deps/iperf_error.Tpo .deps/iperf_error.Plo
/bin/sh ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I.     -g -O2 -Wall -MT iperf_client_api.lo -MD -MP -MF .deps/iperf_client_api.Tpo -c -o iperf_client_api.lo iperf_client_api.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -g -O2 -Wall -MT iperf_client_api.lo -MD -MP -MF .deps/iperf_client_api.Tpo -c iperf_client_api.c  -fPIC -DPIC -o .libs/iperf_client_api.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -g -O2 -Wall -MT iperf_client_api.lo -MD -MP -MF .deps/iperf_client_api.Tpo -c iperf_client_api.c -o iperf_client_api.o >/dev/null 2>&1
mv -f .deps/iperf_client_api.Tpo .deps/iperf_client_api.Plo
/bin/sh ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I.     -g -O2 -Wall -MT iperf_locale.lo -MD -MP -MF .deps/iperf_locale.Tpo -c -o iperf_locale.lo iperf_locale.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -g -O2 -Wall -MT iperf_locale.lo -MD -MP -MF .deps/iperf_locale.Tpo -c iperf_locale.c  -fPIC -DPIC -o .libs/iperf_locale.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -g -O2 -Wall -MT iperf_locale.lo -MD -MP -MF .deps/iperf_locale.Tpo -c iperf_locale.c -o iperf_locale.o >/dev/null 2>&1
mv -f .deps/iperf_locale.Tpo .deps/iperf_locale.Plo
/bin/sh ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I.     -g -O2 -Wall -MT iperf_server_api.lo -MD -MP -MF .deps/iperf_server_api.Tpo -c -o iperf_server_api.lo iperf_server_api.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -g -O2 -Wall -MT iperf_server_api.lo -MD -MP -MF .deps/iperf_server_api.Tpo -c iperf_server_api.c  -fPIC -DPIC -o .libs/iperf_server_api.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -g -O2 -Wall -MT iperf_server_api.lo -MD -MP -MF .deps/iperf_server_api.Tpo -c iperf_server_api.c -o iperf_server_api.o >/dev/null 2>&1
mv -f .deps/iperf_server_api.Tpo .deps/iperf_server_api.Plo
/bin/sh ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I.     -g -O2 -Wall -MT iperf_tcp.lo -MD -MP -MF .deps/iperf_tcp.Tpo -c -o iperf_tcp.lo iperf_tcp.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -g -O2 -Wall -MT iperf_tcp.lo -MD -MP -MF .deps/iperf_tcp.Tpo -c iperf_tcp.c  -fPIC -DPIC -o .libs/iperf_tcp.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -g -O2 -Wall -MT iperf_tcp.lo -MD -MP -MF .deps/iperf_tcp.Tpo -c iperf_tcp.c -o iperf_tcp.o >/dev/null 2>&1
mv -f .deps/iperf_tcp.Tpo .deps/iperf_tcp.Plo
/bin/sh ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I.     -g -O2 -Wall -MT iperf_udp.lo -MD -MP -MF .deps/iperf_udp.Tpo -c -o iperf_udp.lo iperf_udp.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -g -O2 -Wall -MT iperf_udp.lo -MD -MP -MF .deps/iperf_udp.Tpo -c iperf_udp.c  -fPIC -DPIC -o .libs/iperf_udp.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -g -O2 -Wall -MT iperf_udp.lo -MD -MP -MF .deps/iperf_udp.Tpo -c iperf_udp.c -o iperf_udp.o >/dev/null 2>&1
mv -f .deps/iperf_udp.Tpo .deps/iperf_udp.Plo
/bin/sh ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I.     -g -O2 -Wall -MT iperf_sctp.lo -MD -MP -MF .deps/iperf_sctp.Tpo -c -o iperf_sctp.lo iperf_sctp.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -g -O2 -Wall -MT iperf_sctp.lo -MD -MP -MF .deps/iperf_sctp.Tpo -c iperf_sctp.c  -fPIC -DPIC -o .libs/iperf_sctp.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -g -O2 -Wall -MT iperf_sctp.lo -MD -MP -MF .deps/iperf_sctp.Tpo -c iperf_sctp.c -o iperf_sctp.o >/dev/null 2>&1
mv -f .deps/iperf_sctp.Tpo .deps/iperf_sctp.Plo
/bin/sh ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I.     -g -O2 -Wall -MT iperf_util.lo -MD -MP -MF .deps/iperf_util.Tpo -c -o iperf_util.lo iperf_util.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -g -O2 -Wall -MT iperf_util.lo -MD -MP -MF .deps/iperf_util.Tpo -c iperf_util.c  -fPIC -DPIC -o .libs/iperf_util.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -g -O2 -Wall -MT iperf_util.lo -MD -MP -MF .deps/iperf_util.Tpo -c iperf_util.c -o iperf_util.o >/dev/null 2>&1
mv -f .deps/iperf_util.Tpo .deps/iperf_util.Plo
/bin/sh ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I.     -g -O2 -Wall -MT net.lo -MD -MP -MF .deps/net.Tpo -c -o net.lo net.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -g -O2 -Wall -MT net.lo -MD -MP -MF .deps/net.Tpo -c net.c  -fPIC -DPIC -o .libs/net.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -g -O2 -Wall -MT net.lo -MD -MP -MF .deps/net.Tpo -c net.c -o net.o >/dev/null 2>&1
mv -f .deps/net.Tpo .deps/net.Plo
/bin/sh ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I.     -g -O2 -Wall -MT tcp_info.lo -MD -MP -MF .deps/tcp_info.Tpo -c -o tcp_info.lo tcp_info.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -g -O2 -Wall -MT tcp_info.lo -MD -MP -MF .deps/tcp_info.Tpo -c tcp_info.c  -fPIC -DPIC -o .libs/tcp_info.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -g -O2 -Wall -MT tcp_info.lo -MD -MP -MF .deps/tcp_info.Tpo -c tcp_info.c -o tcp_info.o >/dev/null 2>&1
mv -f .deps/tcp_info.Tpo .deps/tcp_info.Plo
/bin/sh ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I.     -g -O2 -Wall -MT tcp_window_size.lo -MD -MP -MF .deps/tcp_window_size.Tpo -c -o tcp_window_size.lo tcp_window_size.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -g -O2 -Wall -MT tcp_window_size.lo -MD -MP -MF .deps/tcp_window_size.Tpo -c tcp_window_size.c  -fPIC -DPIC -o .libs/tcp_window_size.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -g -O2 -Wall -MT tcp_window_size.lo -MD -MP -MF .deps/tcp_window_size.Tpo -c tcp_window_size.c -o tcp_window_size.o >/dev/null 2>&1
mv -f .deps/tcp_window_size.Tpo .deps/tcp_window_size.Plo
/bin/sh ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I.     -g -O2 -Wall -MT timer.lo -MD -MP -MF .deps/timer.Tpo -c -o timer.lo timer.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -g -O2 -Wall -MT timer.lo -MD -MP -MF .deps/timer.Tpo -c timer.c  -fPIC -DPIC -o .libs/timer.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -g -O2 -Wall -MT timer.lo -MD -MP -MF .deps/timer.Tpo -c timer.c -o timer.o >/dev/null 2>&1
mv -f .deps/timer.Tpo .deps/timer.Plo
/bin/sh ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I.     -g -O2 -Wall -MT units.lo -MD -MP -MF .deps/units.Tpo -c -o units.lo units.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -g -O2 -Wall -MT units.lo -MD -MP -MF .deps/units.Tpo -c units.c  -fPIC -DPIC -o .libs/units.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -g -O2 -Wall -MT units.lo -MD -MP -MF .deps/units.Tpo -c units.c -o units.o >/dev/null 2>&1
mv -f .deps/units.Tpo .deps/units.Plo
/bin/sh ../libtool  --tag=CC   --mode=link gcc  -g -O2 -Wall   -o libiperf.la -rpath /usr/local/lib cjson.lo iperf_api.lo iperf_error.lo iperf_client_api.lo iperf_locale.lo iperf_server_api.lo iperf_tcp.lo iperf_udp.lo iperf_sctp.lo iperf_util.lo net.lo tcp_info.lo tcp_window_size.lo timer.lo units.lo  
libtool: link: gcc -shared  -fPIC -DPIC  .libs/cjson.o .libs/iperf_api.o .libs/iperf_error.o .libs/iperf_client_api.o .libs/iperf_locale.o .libs/iperf_server_api.o .libs/iperf_tcp.o .libs/iperf_udp.o .libs/iperf_sctp.o .libs/iperf_util.o .libs/net.o .libs/tcp_info.o .libs/tcp_window_size.o .libs/timer.o .libs/units.o    -g -O2   -Wl,-soname -Wl,libiperf.so.0 -o .libs/libiperf.so.0.0.0
libtool: link: (cd ".libs" && rm -f "libiperf.so.0" && ln -s "libiperf.so.0.0.0" "libiperf.so.0")
libtool: link: (cd ".libs" && rm -f "libiperf.so" && ln -s "libiperf.so.0.0.0" "libiperf.so")
libtool: link: ar cru .libs/libiperf.a  cjson.o iperf_api.o iperf_error.o iperf_client_api.o iperf_locale.o iperf_server_api.o iperf_tcp.o iperf_udp.o iperf_sctp.o iperf_util.o net.o tcp_info.o tcp_window_size.o timer.o units.o
libtool: link: ranlib .libs/libiperf.a
libtool: link: ( cd ".libs" && rm -f "libiperf.la" && ln -s "../libiperf.la" "libiperf.la" )
gcc -DHAVE_CONFIG_H -I.    -g -g -O2 -Wall -MT iperf3-main.o -MD -MP -MF .deps/iperf3-main.Tpo -c -o iperf3-main.o `test -f 'main.c' || echo './'`main.c
mv -f .deps/iperf3-main.Tpo .deps/iperf3-main.Po
/bin/sh ../libtool  --tag=CC   --mode=link gcc -g -g -O2 -Wall -g  -o iperf3 iperf3-main.o libiperf.la 
libtool: link: gcc -g -g -O2 -Wall -g -o .libs/iperf3 iperf3-main.o  ./.libs/libiperf.so
gcc -DHAVE_CONFIG_H -I.    -g -g -O2 -Wall -MT t_timer-t_timer.o -MD -MP -MF .deps/t_timer-t_timer.Tpo -c -o t_timer-t_timer.o `test -f 't_timer.c' || echo './'`t_timer.c
mv -f .deps/t_timer-t_timer.Tpo .deps/t_timer-t_timer.Po
/bin/sh ../libtool  --tag=CC   --mode=link gcc -g -g -O2 -Wall   -o t_timer t_timer-t_timer.o libiperf.la 
libtool: link: gcc -g -g -O2 -Wall -o .libs/t_timer t_timer-t_timer.o  ./.libs/libiperf.so
gcc -DHAVE_CONFIG_H -I.    -g -g -O2 -Wall -MT t_units-t_units.o -MD -MP -MF .deps/t_units-t_units.Tpo -c -o t_units-t_units.o `test -f 't_units.c' || echo './'`t_units.c
mv -f .deps/t_units-t_units.Tpo .deps/t_units-t_units.Po
/bin/sh ../libtool  --tag=CC   --mode=link gcc -g -g -O2 -Wall   -o t_units t_units-t_units.o libiperf.la 
libtool: link: gcc -g -g -O2 -Wall -o .libs/t_units t_units-t_units.o  ./.libs/libiperf.so
gcc -DHAVE_CONFIG_H -I.    -g -g -O2 -Wall -MT t_uuid-t_uuid.o -MD -MP -MF .deps/t_uuid-t_uuid.Tpo -c -o t_uuid-t_uuid.o `test -f 't_uuid.c' || echo './'`t_uuid.c
mv -f .deps/t_uuid-t_uuid.Tpo .deps/t_uuid-t_uuid.Po
/bin/sh ../libtool  --tag=CC   --mode=link gcc -g -g -O2 -Wall   -o t_uuid t_uuid-t_uuid.o libiperf.la 
libtool: link: gcc -g -g -O2 -Wall -o .libs/t_uuid t_uuid-t_uuid.o  ./.libs/libiperf.so
gcc -DHAVE_CONFIG_H -I.    -pg -g -g -O2 -Wall -MT iperf3_profile-main.o -MD -MP -MF .deps/iperf3_profile-main.Tpo -c -o iperf3_profile-main.o `test -f 'main.c' || echo './'`main.c
mv -f .deps/iperf3_profile-main.Tpo .deps/iperf3_profile-main.Po
gcc -DHAVE_CONFIG_H -I.    -pg -g -g -O2 -Wall -MT iperf3_profile-cjson.o -MD -MP -MF .deps/iperf3_profile-cjson.Tpo -c -o iperf3_profile-cjson.o `test -f 'cjson.c' || echo './'`cjson.c
mv -f .deps/iperf3_profile-cjson.Tpo .deps/iperf3_profile-cjson.Po
gcc -DHAVE_CONFIG_H -I.    -pg -g -g -O2 -Wall -MT iperf3_profile-iperf_api.o -MD -MP -MF .deps/iperf3_profile-iperf_api.Tpo -c -o iperf3_profile-iperf_api.o `test -f 'iperf_api.c' || echo './'`iperf_api.c
iperf_api.c: In function ‘diskfile_recv’:
iperf_api.c:2804:2: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
  (void) write(sp->diskfile_fd, sp->buffer, r);
  ^
iperf_api.c: In function ‘iperf_reporter_callback’:
iperf_api.c:2445:10: warning: ‘end_time’ may be used uninitialized in this function [-Wmaybe-uninitialized]
   iprintf(test, report_sum_bw_udp_format, start_time, end_time, ubuf, nbuf, avg_jitter * 1000.0, lost_packets, total_packets, lost_percent, "");
          ^
iperf_api.c:2280:24: note: ‘end_time’ was declared here
     double start_time, end_time, avg_jitter = 0.0, lost_percent;
                        ^
mv -f .deps/iperf3_profile-iperf_api.Tpo .deps/iperf3_profile-iperf_api.Po
gcc -DHAVE_CONFIG_H -I.    -pg -g -g -O2 -Wall -MT iperf3_profile-iperf_error.o -MD -MP -MF .deps/iperf3_profile-iperf_error.Tpo -c -o iperf3_profile-iperf_error.o `test -f 'iperf_error.c' || echo './'`iperf_error.c
mv -f .deps/iperf3_profile-iperf_error.Tpo .deps/iperf3_profile-iperf_error.Po
gcc -DHAVE_CONFIG_H -I.    -pg -g -g -O2 -Wall -MT iperf3_profile-iperf_client_api.o -MD -MP -MF .deps/iperf3_profile-iperf_client_api.Tpo -c -o iperf3_profile-iperf_client_api.o `test -f 'iperf_client_api.c' || echo './'`iperf_client_api.c
mv -f .deps/iperf3_profile-iperf_client_api.Tpo .deps/iperf3_profile-iperf_client_api.Po
gcc -DHAVE_CONFIG_H -I.    -pg -g -g -O2 -Wall -MT iperf3_profile-iperf_locale.o -MD -MP -MF .deps/iperf3_profile-iperf_locale.Tpo -c -o iperf3_profile-iperf_locale.o `test -f 'iperf_locale.c' || echo './'`iperf_locale.c
mv -f .deps/iperf3_profile-iperf_locale.Tpo .deps/iperf3_profile-iperf_locale.Po
gcc -DHAVE_CONFIG_H -I.    -pg -g -g -O2 -Wall -MT iperf3_profile-iperf_server_api.o -MD -MP -MF .deps/iperf3_profile-iperf_server_api.Tpo -c -o iperf3_profile-iperf_server_api.o `test -f 'iperf_server_api.c' || echo './'`iperf_server_api.c
mv -f .deps/iperf3_profile-iperf_server_api.Tpo .deps/iperf3_profile-iperf_server_api.Po
gcc -DHAVE_CONFIG_H -I.    -pg -g -g -O2 -Wall -MT iperf3_profile-iperf_tcp.o -MD -MP -MF .deps/iperf3_profile-iperf_tcp.Tpo -c -o iperf3_profile-iperf_tcp.o `test -f 'iperf_tcp.c' || echo './'`iperf_tcp.c
mv -f .deps/iperf3_profile-iperf_tcp.Tpo .deps/iperf3_profile-iperf_tcp.Po
gcc -DHAVE_CONFIG_H -I.    -pg -g -g -O2 -Wall -MT iperf3_profile-iperf_udp.o -MD -MP -MF .deps/iperf3_profile-iperf_udp.Tpo -c -o iperf3_profile-iperf_udp.o `test -f 'iperf_udp.c' || echo './'`iperf_udp.c
mv -f .deps/iperf3_profile-iperf_udp.Tpo .deps/iperf3_profile-iperf_udp.Po
gcc -DHAVE_CONFIG_H -I.    -pg -g -g -O2 -Wall -MT iperf3_profile-iperf_sctp.o -MD -MP -MF .deps/iperf3_profile-iperf_sctp.Tpo -c -o iperf3_profile-iperf_sctp.o `test -f 'iperf_sctp.c' || echo './'`iperf_sctp.c
mv -f .deps/iperf3_profile-iperf_sctp.Tpo .deps/iperf3_profile-iperf_sctp.Po
gcc -DHAVE_CONFIG_H -I.    -pg -g -g -O2 -Wall -MT iperf3_profile-iperf_util.o -MD -MP -MF .deps/iperf3_profile-iperf_util.Tpo -c -o iperf3_profile-iperf_util.o `test -f 'iperf_util.c' || echo './'`iperf_util.c
mv -f .deps/iperf3_profile-iperf_util.Tpo .deps/iperf3_profile-iperf_util.Po
gcc -DHAVE_CONFIG_H -I.    -pg -g -g -O2 -Wall -MT iperf3_profile-net.o -MD -MP -MF .deps/iperf3_profile-net.Tpo -c -o iperf3_profile-net.o `test -f 'net.c' || echo './'`net.c
mv -f .deps/iperf3_profile-net.Tpo .deps/iperf3_profile-net.Po
gcc -DHAVE_CONFIG_H -I.    -pg -g -g -O2 -Wall -MT iperf3_profile-tcp_info.o -MD -MP -MF .deps/iperf3_profile-tcp_info.Tpo -c -o iperf3_profile-tcp_info.o `test -f 'tcp_info.c' || echo './'`tcp_info.c
mv -f .deps/iperf3_profile-tcp_info.Tpo .deps/iperf3_profile-tcp_info.Po
gcc -DHAVE_CONFIG_H -I.    -pg -g -g -O2 -Wall -MT iperf3_profile-tcp_window_size.o -MD -MP -MF .deps/iperf3_profile-tcp_window_size.Tpo -c -o iperf3_profile-tcp_window_size.o `test -f 'tcp_window_size.c' || echo './'`tcp_window_size.c
mv -f .deps/iperf3_profile-tcp_window_size.Tpo .deps/iperf3_profile-tcp_window_size.Po
gcc -DHAVE_CONFIG_H -I.    -pg -g -g -O2 -Wall -MT iperf3_profile-timer.o -MD -MP -MF .deps/iperf3_profile-timer.Tpo -c -o iperf3_profile-timer.o `test -f 'timer.c' || echo './'`timer.c
mv -f .deps/iperf3_profile-timer.Tpo .deps/iperf3_profile-timer.Po
gcc -DHAVE_CONFIG_H -I.    -pg -g -g -O2 -Wall -MT iperf3_profile-units.o -MD -MP -MF .deps/iperf3_profile-units.Tpo -c -o iperf3_profile-units.o `test -f 'units.c' || echo './'`units.c
mv -f .deps/iperf3_profile-units.Tpo .deps/iperf3_profile-units.Po
/bin/sh ../libtool  --tag=CC   --mode=link gcc -pg -g -g -O2 -Wall -pg -g  -o iperf3_profile iperf3_profile-main.o iperf3_profile-cjson.o iperf3_profile-iperf_api.o iperf3_profile-iperf_error.o iperf3_profile-iperf_client_api.o iperf3_profile-iperf_locale.o iperf3_profile-iperf_server_api.o iperf3_profile-iperf_tcp.o iperf3_profile-iperf_udp.o iperf3_profile-iperf_sctp.o iperf3_profile-iperf_util.o iperf3_profile-net.o iperf3_profile-tcp_info.o iperf3_profile-tcp_window_size.o iperf3_profile-timer.o iperf3_profile-units.o libiperf.la 
libtool: link: gcc -pg -g -g -O2 -Wall -pg -g -o .libs/iperf3_profile iperf3_profile-main.o iperf3_profile-cjson.o iperf3_profile-iperf_api.o iperf3_profile-iperf_error.o iperf3_profile-iperf_client_api.o iperf3_profile-iperf_locale.o iperf3_profile-iperf_server_api.o iperf3_profile-iperf_tcp.o iperf3_profile-iperf_udp.o iperf3_profile-iperf_sctp.o iperf3_profile-iperf_util.o iperf3_profile-net.o iperf3_profile-tcp_info.o iperf3_profile-tcp_window_size.o iperf3_profile-timer.o iperf3_profile-units.o  ./.libs/libiperf.so
make[2]: ディレクトリ `/home/yosuke/workspace/iperf-3.1.2/src' から出ます
make[1]: ディレクトリ `/home/yosuke/workspace/iperf-3.1.2/src' から出ます
Making all in examples
make[1]: ディレクトリ `/home/yosuke/workspace/iperf-3.1.2/examples' に入ります
gcc -DHAVE_CONFIG_H -I. -I../src  -I../src  -g -g -O2 -Wall -MT mic-mic.o -MD -MP -MF .deps/mic-mic.Tpo -c -o mic-mic.o `test -f 'mic.c' || echo './'`mic.c
mv -f .deps/mic-mic.Tpo .deps/mic-mic.Po
/bin/sh ../libtool  --tag=CC   --mode=link gcc -g -g -O2 -Wall -g  -o mic mic-mic.o ../src/libiperf.la 
libtool: link: gcc -g -g -O2 -Wall -g -o .libs/mic mic-mic.o  ../src/.libs/libiperf.so
gcc -DHAVE_CONFIG_H -I. -I../src  -I../src  -g -g -O2 -Wall -MT mis-mis.o -MD -MP -MF .deps/mis-mis.Tpo -c -o mis-mis.o `test -f 'mis.c' || echo './'`mis.c
mv -f .deps/mis-mis.Tpo .deps/mis-mis.Po
/bin/sh ../libtool  --tag=CC   --mode=link gcc -g -g -O2 -Wall -g  -o mis mis-mis.o ../src/libiperf.la 
libtool: link: gcc -g -g -O2 -Wall -g -o .libs/mis mis-mis.o  ../src/.libs/libiperf.so
make[1]: ディレクトリ `/home/yosuke/workspace/iperf-3.1.2/examples' から出ます
make[1]: ディレクトリ `/home/yosuke/workspace/iperf-3.1.2' に入ります
make[1]: `all-am' に対して行うべき事はありません.
make[1]: ディレクトリ `/home/yosuke/workspace/iperf-3.1.2' から出ます
yosuke@yosuke-vm:~/workspace/iperf-3.1.2$ 

make instaはsudoを付けておかないと失敗します。

yosuke@yosuke-vm:~/workspace/iperf-3.1.2$ make install
Making install in src
make[1]: ディレクトリ `/home/yosuke/workspace/iperf-3.1.2/src' に入ります
make[2]: ディレクトリ `/home/yosuke/workspace/iperf-3.1.2/src' に入ります
 /bin/mkdir -p '/usr/local/lib'
 /bin/sh ../libtool   --mode=install /usr/bin/install -c   libiperf.la '/usr/local/lib'
libtool: install: /usr/bin/install -c .libs/libiperf.so.0.0.0 /usr/local/lib/libiperf.so.0.0.0
/usr/bin/install: cannot create regular file '/usr/local/lib/libiperf.so.0.0.0': Permission denied
make[2]: *** [install-libLTLIBRARIES] エラー 1
make[2]: ディレクトリ `/home/yosuke/workspace/iperf-3.1.2/src' から出ます
make[1]: *** [install-am] エラー 2
make[1]: ディレクトリ `/home/yosuke/workspace/iperf-3.1.2/src' から出ます
make: *** [install-recursive] エラー 1
yosuke@yosuke-vm:~/workspace/iperf-3.1.2$ sudo make install
[sudo] password for yosuke: 
Making install in src
make[1]: ディレクトリ `/home/yosuke/workspace/iperf-3.1.2/src' に入ります
make[2]: ディレクトリ `/home/yosuke/workspace/iperf-3.1.2/src' に入ります
 /bin/mkdir -p '/usr/local/lib'
 /bin/sh ../libtool   --mode=install /usr/bin/install -c   libiperf.la '/usr/local/lib'
libtool: install: /usr/bin/install -c .libs/libiperf.so.0.0.0 /usr/local/lib/libiperf.so.0.0.0
libtool: install: (cd /usr/local/lib && { ln -s -f libiperf.so.0.0.0 libiperf.so.0 || { rm -f libiperf.so.0 && ln -s libiperf.so.0.0.0 libiperf.so.0; }; })
libtool: install: (cd /usr/local/lib && { ln -s -f libiperf.so.0.0.0 libiperf.so || { rm -f libiperf.so && ln -s libiperf.so.0.0.0 libiperf.so; }; })
libtool: install: /usr/bin/install -c .libs/libiperf.lai /usr/local/lib/libiperf.la
libtool: install: /usr/bin/install -c .libs/libiperf.a /usr/local/lib/libiperf.a
libtool: install: chmod 644 /usr/local/lib/libiperf.a
libtool: install: ranlib /usr/local/lib/libiperf.a
libtool: finish: PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/sbin" ldconfig -n /usr/local/lib
----------------------------------------------------------------------
Libraries have been installed in:
   /usr/local/lib

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the '-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the 'LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the 'LD_RUN_PATH' environment variable
     during linking
   - use the '-Wl,-rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to '/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
 /bin/mkdir -p '/usr/local/bin'
  /bin/sh ../libtool   --mode=install /usr/bin/install -c iperf3 '/usr/local/bin'
libtool: install: /usr/bin/install -c .libs/iperf3 /usr/local/bin/iperf3
 /bin/mkdir -p '/usr/local/include'
 /usr/bin/install -c -m 644 iperf_api.h '/usr/local/include'
 /bin/mkdir -p '/usr/local/share/man/man1'
 /usr/bin/install -c -m 644 iperf3.1 '/usr/local/share/man/man1'
 /bin/mkdir -p '/usr/local/share/man/man3'
 /usr/bin/install -c -m 644 libiperf.3 '/usr/local/share/man/man3'
make[2]: ディレクトリ `/home/yosuke/workspace/iperf-3.1.2/src' から出ます
make[1]: ディレクトリ `/home/yosuke/workspace/iperf-3.1.2/src' から出ます
Making install in examples
make[1]: ディレクトリ `/home/yosuke/workspace/iperf-3.1.2/examples' に入ります
make[2]: ディレクトリ `/home/yosuke/workspace/iperf-3.1.2/examples' に入ります
make[2]: `install-exec-am' に対して行うべき事はありません.
make[2]: `install-data-am' に対して行うべき事はありません.
make[2]: ディレクトリ `/home/yosuke/workspace/iperf-3.1.2/examples' から出ます
make[1]: ディレクトリ `/home/yosuke/workspace/iperf-3.1.2/examples' から出ます
make[1]: ディレクトリ `/home/yosuke/workspace/iperf-3.1.2' に入ります
make[2]: ディレクトリ `/home/yosuke/workspace/iperf-3.1.2' に入ります
make[2]: `install-exec-am' に対して行うべき事はありません.
make[2]: `install-data-am' に対して行うべき事はありません.
make[2]: ディレクトリ `/home/yosuke/workspace/iperf-3.1.2' から出ます
make[1]: ディレクトリ `/home/yosuke/workspace/iperf-3.1.2' から出ます
yosuke@yosuke-vm:~/workspace/iperf-3.1.2$ 

ネットワーク速度測定

ターゲットとPC Linuxへの導入が終わったら、実際にネットワーク速度を測定します。

準備

ターゲットとPC Linuxが同一ネットワーク上にあることを確認しておきます。

yosuke@yosuke-vm:~/iperf-3.1.2$ ping 192.168.0.4
PING 192.168.0.4 (192.168.0.4) 56(84) bytes of data.
64 bytes from 192.168.0.4: icmp_seq=1 ttl=64 time=1.10 ms
64 bytes from 192.168.0.4: icmp_seq=2 ttl=64 time=0.470 ms
^C
--- 192.168.0.4 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1001ms
rtt min/avg/max/mdev = 0.470/0.787/1.104/0.317 ms
yosuke@yosuke-vm:~/iperf-3.1.2$

上り速度

PC Linuxでiperf3をサーバとして実行します。

yosuke@yosuke-vm:~/iperf-3.1.2$ iperf3 -s
-----------------------------------------------------------
Server listening on 5201
-----------------------------------------------------------

ターゲットでiperf3をクライアントとして実行します。

root@sw_interrupt:~# ./iperf3 -c 192.168.0.9
Connecting to host 192.168.0.9, port 5201
[  4] local 192.168.0.4 port 53214 connected to 192.168.0.9 port 5201
random: nonblocking pool is initialized
[ ID] Interval           Transfer     Bandwidth       Retr  Cwnd
[  4]   0.00-1.00   sec  11.6 MBytes  97.0 Mbits/sec    0    132 KBytes
[  4]   1.00-2.00   sec  11.2 MBytes  93.8 Mbits/sec    0    139 KBytes
[  4]   2.00-3.00   sec  11.2 MBytes  93.8 Mbits/sec    0    139 KBytes
[  4]   3.00-4.00   sec  11.4 MBytes  95.4 Mbits/sec    0    154 KBytes
[  4]   4.00-5.00   sec  11.2 MBytes  93.8 Mbits/sec    0    154 KBytes
[  4]   5.00-6.00   sec  11.2 MBytes  93.8 Mbits/sec    0    154 KBytes
[  4]   6.00-7.00   sec  11.2 MBytes  93.8 Mbits/sec    0    154 KBytes
[  4]   7.00-8.00   sec  11.7 MBytes  98.0 Mbits/sec    0    243 KBytes
[  4]   8.00-9.00   sec  11.1 MBytes  93.3 Mbits/sec    0    243 KBytes
[  4]   9.00-10.00  sec  11.4 MBytes  95.9 Mbits/sec    0    359 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth       Retr
[  4]   0.00-10.00  sec   113 MBytes  94.9 Mbits/sec    0             sender
[  4]   0.00-10.00  sec   112 MBytes  94.2 Mbits/sec                  receiver

iperf Done.
root@sw_interrupt:~#

下り速度

PetaLinuxでiperf3をサーバとして実行します。

root@sw_interrupt:~/iperf-3.1.2$ iperf3 -s
-----------------------------------------------------------
Server listening on 5201
-----------------------------------------------------------

PC Linuxでiperf3をクライアントとして実行します。

  • Rは繰り返し実行を意味する。
root@sw_interrupt:~# ./iperf3 -c 192.168.0.9 -R
Connecting to host 192.168.0.9, port 5201
Reverse mode, remote host 192.168.0.9 is sending
[  4] local 192.168.0.4 port 53216 connected to 192.168.0.9 port 5201
[ ID] Interval           Transfer     Bandwidth
[  4]   0.00-1.00   sec  11.3 MBytes  94.5 Mbits/sec
[  4]   1.00-2.00   sec  11.2 MBytes  93.9 Mbits/sec
[  4]   2.00-3.00   sec  11.2 MBytes  93.9 Mbits/sec
[  4]   3.00-4.00   sec  11.2 MBytes  93.9 Mbits/sec
[  4]   4.00-5.00   sec  11.2 MBytes  93.9 Mbits/sec
[  4]   5.00-6.00   sec  11.2 MBytes  93.9 Mbits/sec
[  4]   6.00-7.00   sec  11.2 MBytes  93.9 Mbits/sec
[  4]   7.00-8.00   sec  11.2 MBytes  93.9 Mbits/sec
[  4]   8.00-9.00   sec  11.2 MBytes  93.9 Mbits/sec
[  4]   9.00-10.00  sec  11.2 MBytes  93.9 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth       Retr
[  4]   0.00-10.00  sec   115 MBytes  96.2 Mbits/sec    0             sender
[  4]   0.00-10.00  sec   114 MBytes  95.7 Mbits/sec                  receiver

iperf Done.
root@sw_interrupt:~#


一目瞭然ですが、上りも下りも100mbps環境下で測定した結果です。