netperf2010-02-04 22:36:39

ネットワークパフォーマンスを測定する.

$ wget ftp://ftp.netperf.org/netperf/netperf-2.4.5.tar.gz
$ tar zxvf netperf-2.4.5.tar.gz
$ cd netperf-2.4.5
$ ./configure
SPECファイルを書き換える.
$ vi netperf.spec

Summary: Network Performance Testing Tool
Name: netperf
Version: 2.4.5
Release: 1
Copyright: Unknown # 削除
License: GPL    # 追加
Group: System Environment/Base
URL: http://www.netperf.org/
Packager: Martin A. Brown
Source: ftp://ftp.netperf.org/netperf/%{name}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-root
Prefix: /usr
$ cd ../
$ tar czvf netperf-2.4.5.tar.gz netperf-2.4.5
$ su

rpmを作成する.
# rpmbuild -tb netperf-2.4.5.tar.gz

インストール
# rpm -ivh /usr/src/redhat/RPMS/x86_64/netperf-2.4.5-1.x86_64.rpm

HostAでサーバを起動
# netserver
Starting netserver at port 12865
Starting netserver at hostname 0.0.0.0 port 12865 and family AF_UNSPEC

HostBでクライアントを起動して,パフォーマンスを測定する.
# netperf -H 192.168.2.20
TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 192.168.2.20 (192.168.2.20) port 0 AF_INET
Recv   Send    Send
Socket Socket  Message  Elapsed
Size   Size    Size     Time     Throughput
bytes  bytes   bytes    secs.    10^6bits/sec

  8192  16384  16384    10.02      20.37