トップ «前の日記(2018-09-25(Tue)) 最新 次の日記(2018-09-30(Sun))» 編集

屑俺日記

僕の備忘録(PC、UN*X、ネットワーク関連が中心)なんです。
自分の書いたところは適当(な時とか)に書き換えますので御了承を。


2018-09-28(Fri) 秋晴れ

iperf3(1)

クライアント - サーバ構成のネットワーク診断ツール、でいいかしら

$SERVER $ iperf3 -s
-----------------------------------------------------------
Server listening on 5201
-----------------------------------------------------------
Accepted connection from $CLIENT, port 34252
[  5] local $SERVER port 5201 connected to $CLIENT port 34254
[ ID] Interval           Transfer     Bandwidth
[  5]   0.00-1.00   sec  11.0 MBytes  92.3 Mbits/sec
[  5]   1.00-2.00   sec  11.2 MBytes  94.2 Mbits/sec
[  5]   2.00-3.00   sec  11.2 MBytes  94.1 Mbits/sec
[  5]   3.00-4.00   sec  11.2 MBytes  94.1 Mbits/sec
[  5]   4.00-5.00   sec  11.2 MBytes  94.2 Mbits/sec
[  5]   5.00-6.00   sec  11.2 MBytes  94.2 Mbits/sec
[  5]   6.00-7.00   sec  11.2 MBytes  94.1 Mbits/sec
[  5]   7.00-8.00   sec  11.2 MBytes  94.1 Mbits/sec
[  5]   8.00-9.00   sec  11.2 MBytes  94.0 Mbits/sec
[  5]   9.00-10.00  sec  11.2 MBytes  94.1 Mbits/sec
[  5]  10.00-10.03  sec   304 KBytes  94.0 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth
[  5]   0.00-10.03  sec  0.00 Bytes  0.00 bits/sec                  sender
[  5]   0.00-10.03  sec   112 MBytes  93.9 Mbits/sec                  receiver
-----------------------------------------------------------
Server listening on 5201
-----------------------------------------------------------
$CLIENT $ iperf3 -c $SERVER
Connecting to host $SERVER, port 5201
[  4] local $CLIENT port 34254 connected to $SERVER port 5201
[ ID] Interval           Transfer     Bandwidth       Retr  Cwnd
[  4]   0.00-1.00   sec  11.4 MBytes  95.6 Mbits/sec    9   66.5 KBytes       
[  4]   1.00-2.00   sec  11.2 MBytes  94.1 Mbits/sec    5   83.4 KBytes       
[  4]   2.00-3.00   sec  11.2 MBytes  94.1 Mbits/sec    7   69.3 KBytes       
[  4]   3.00-4.00   sec  11.2 MBytes  94.1 Mbits/sec    6   83.4 KBytes       
[  4]   4.00-5.00   sec  11.2 MBytes  94.2 Mbits/sec    8   66.5 KBytes       
[  4]   5.00-6.00   sec  11.2 MBytes  94.1 Mbits/sec    6   83.4 KBytes       
[  4]   6.00-7.00   sec  11.2 MBytes  94.2 Mbits/sec    7   69.3 KBytes       
[  4]   7.00-8.00   sec  11.2 MBytes  94.1 Mbits/sec    6   83.4 KBytes       
[  4]   8.00-9.00   sec  11.2 MBytes  94.0 Mbits/sec    7   69.3 KBytes       
[  4]   9.00-10.00  sec  11.2 MBytes  94.1 Mbits/sec    6   83.4 KBytes       
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth       Retr
[  4]   0.00-10.00  sec   112 MBytes  94.3 Mbits/sec   67             sender
[  4]   0.00-10.00  sec   112 MBytes  94.2 Mbits/sec                  receiver
 
iperf Done.

時間を数えてみた

micropython で、running_time() を使う。
sleepを挟まないfizzbuzz(ほとんど分からない)を実行して、再度 running_time()。時間を引いて、1000で割って、strにして、横スクロールで流して。

流石に 33554432 までfizzbuzzする気にはなれず、 1000回でやめた。
ざっと10.95秒かかった。

2^25までfizzbuzzするには、4日と6時間ほどかかるはず...?

$ echo '2^25*(10.95/1000)/60/60/24' | bc -l
4.25255822222222222222

リンクはご自由にどうぞ。でもURLや内容が変った場合はあしからず。

index.htmlは ここから。