
iperf というソフトを使うと、ネットワークの速度を測定できます。
主にLAN内の速度(スループット)を測るために使用します。
iperf のインストール
yum install epel-release
yum install iperf
epelリポジトリと iperf をインストールします。
iperf サーバ側の起動
iperf -s
------------------------------------------------------------
Server listening on TCP port 5001
TCP window size: 85.3 KByte (default)
------------------------------------------------------------
iperf クライアント側の起動
iperf のクライアントはサーバにあったバージョンにします。
epel でインストールされるバージョンは 2.0.12 でしたので、2系を使用します。
クライアントがMac の例
homebrew をインストールしていれば、下記コマンドで iperf がインストールされます。
brew install iperf
クライアントからサーバへ接続
iperf -c 192.168.xxx.yyy
結果
クライアント側(Mac)
iperf -c [サーバアドレス]
------------------------------------------------------------
Client connecting to 192.168.xxx.srv, TCP port 5001
TCP window size: 129 KByte (default)
------------------------------------------------------------
[ 6] local 192.168.xxx.cli port 53649 connected with 192.168.xxx.srv port 5001
[ ID] Interval Transfer Bandwidth
[ 6] 0.0-10.0 sec 1.09 GBytes 937 Mbits/sec
937Mbits/sec = 117.125MB/sec 出ていることになります。
LAN の Gigabit Etherが1Gbps(1Gbit/sec=1000Mbit/sec)でリンクしているのでほぼ最高の速度が出ていることがわかります。
サーバ側(Linux(CentOS7))
iperf -s
------------------------------------------------------------
Server listening on TCP port 5001
TCP window size: 85.3 KByte (default)
------------------------------------------------------------
[ 4] local 192.168.xxx.srv port 5001 connected with 192.168.xxx.cli port 53649
[ ID] Interval Transfer Bandwidth
[ 4] 0.0-10.0 sec 1.09 GBytes 935 Mbits/sec
こちらは、935Mbits/sec = 116.875MB/sec