Hi all

I need to test an adhoc wlan connection and use iperf alongside with 
other tools like ping, iwconfig, etc.
So that iperf has it's own timeslot I use it in a loop with the -t option.

When I do that the reported speed drops because iperf uses a longer time 
after each run.
With this script:

   #!/bin/bash
   iperf -u -s > /dev/null &
   for i in {1..5}; do
     iperf -u -c localhost -t 1
   done

With "iperf version 2.0.5 (08 Jul 2010) pthreads" I get the following 
output.
Please see that the time of the server report is incremented and the 
Bandwidth drops because of that.

   ------------------------------------------------------------
   Client connecting to localhost, UDP port 5001
   Sending 1470 byte datagrams
   UDP buffer size:  224 KByte (default)
   ------------------------------------------------------------
   [  3] local 127.0.0.1 port 51709 connected with 127.0.0.1 port 5001
   [ ID] Interval       Transfer     Bandwidth
   [  3]  0.0- 1.0 sec   131 KBytes  1.05 Mbits/sec
   [  3] Sent 91 datagrams
   [  3] Server Report:
   [  3]  0.0- 1.0 sec   131 KBytes  1.05 Mbits/sec   0.010 ms 0/   91 (0%)
   ------------------------------------------------------------
   Client connecting to localhost, UDP port 5001
   Sending 1470 byte datagrams
   UDP buffer size:  224 KByte (default)
   ------------------------------------------------------------
   [  3] local 127.0.0.1 port 35218 connected with 127.0.0.1 port 5001
   [ ID] Interval       Transfer     Bandwidth
   [  3]  0.0- 1.0 sec   131 KBytes  1.05 Mbits/sec
   [  3] Sent 91 datagrams
   [  3] Server Report:
   [  3]  0.0- 2.1 sec   131 KBytes   518 Kbits/sec   0.010 ms 0/   91 (0%)
   ------------------------------------------------------------
   Client connecting to localhost, UDP port 5001
   Sending 1470 byte datagrams
   UDP buffer size:  224 KByte (default)
   ------------------------------------------------------------
   [  3] local 127.0.0.1 port 34262 connected with 127.0.0.1 port 5001
   [ ID] Interval       Transfer     Bandwidth
   [  3]  0.0- 1.0 sec   131 KBytes  1.05 Mbits/sec
   [  3] Sent 91 datagrams
   [  3] Server Report:
   [  3]  0.0- 3.1 sec   131 KBytes   343 Kbits/sec   0.008 ms 0/   91 (0%)
   ------------------------------------------------------------
   Client connecting to localhost, UDP port 5001
   Sending 1470 byte datagrams
   UDP buffer size:  224 KByte (default)
   ------------------------------------------------------------
   [  3] local 127.0.0.1 port 40974 connected with 127.0.0.1 port 5001
   [ ID] Interval       Transfer     Bandwidth
   [  3]  0.0- 1.0 sec   131 KBytes  1.05 Mbits/sec
   [  3] Sent 91 datagrams
   [  3] Server Report:
   [  3]  0.0- 4.2 sec   131 KBytes   257 Kbits/sec   0.011 ms 0/   91 (0%)
   ------------------------------------------------------------
   Client connecting to localhost, UDP port 5001
   Sending 1470 byte datagrams
   UDP buffer size:  224 KByte (default)
   ------------------------------------------------------------
   [  3] local 127.0.0.1 port 56975 connected with 127.0.0.1 port 5001
   [ ID] Interval       Transfer     Bandwidth
   [  3]  0.0- 1.0 sec   131 KBytes  1.05 Mbits/sec
   [  3] Sent 91 datagrams
   [  3] Server Report:
   [  3]  0.0- 5.2 sec   131 KBytes   205 Kbits/sec   0.007 ms 0/   91 (0%)


I this a known bug or a feature? Maybe I should post a bug report?
How can I use iperf in a proper way in a loop?
I'd like to specify the output format (-f) so that I the numbers in the 
same range which is much easier to analyse it afterwards.

Atm I'm using the Transfer number of the server report but it's 
sometimes in KBytes and sometimes in MBytes which makes postprocessing 
cumbersome.
And if the time option of iperf client is changed then I use the wrong 
time to calculate the Bandwidth.


Best regards
Ramon

------------------------------------------------------------------------------
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
_______________________________________________
Iperf-users mailing list
Iperf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iperf-users

Reply via email to