mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Fix iperf
This commit is contained in:
parent
4ba73e9908
commit
470b839c61
2 changed files with 11 additions and 12 deletions
|
@ -15,10 +15,9 @@ function run_test(server,proto,mode,updown,omit,parallel,transmit,bitrate)
|
||||||
local iperf
|
local iperf
|
||||||
local addr = uci:get("iperf",server,"host")
|
local addr = uci:get("iperf",server,"host")
|
||||||
local ports = uci:get("iperf",server,"ports")
|
local ports = uci:get("iperf",server,"ports")
|
||||||
if proto == "ipv4" then
|
local ipv = "4"
|
||||||
local ipv = 4
|
if proto == "ipv6" then
|
||||||
else
|
local ipv = "6"
|
||||||
local ipv = 6
|
|
||||||
end
|
end
|
||||||
|
|
||||||
local t={}
|
local t={}
|
||||||
|
@ -28,15 +27,15 @@ function run_test(server,proto,mode,updown,omit,parallel,transmit,bitrate)
|
||||||
local port = t[ math.random( #t ) ]
|
local port = t[ math.random( #t ) ]
|
||||||
if mode == "tcp" then
|
if mode == "tcp" then
|
||||||
if updown == "upload" then
|
if updown == "upload" then
|
||||||
iperf = io.popen("iperf3 -c %s -P %s -%i -p %s -O %s -t %i -J" % {ut.shellquote(addr),parallel,ipv,port,omit,transmit})
|
iperf = io.popen("iperf3 -c %s -P %s -%s -p %s -O %s -t %s -J" % {ut.shellquote(addr),parallel,ipv,port,omit,transmit})
|
||||||
else
|
else
|
||||||
iperf = io.popen("iperf3 -c %s -P %s -%i -p %s -O %s -R -t %s -J" % {ut.shellquote(addr),parallel,ipv,port,omit,transmit})
|
iperf = io.popen("iperf3 -c %s -P %s -%s -p %s -O %s -R -t %s -J" % {ut.shellquote(addr),parallel,ipv,port,omit,transmit})
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
if updown == "upload" then
|
if updown == "upload" then
|
||||||
iperf = io.popen("iperf3 -c %s -P %s -%i -p %s -O %s -t %s -u -b %s -J" % {ut.shellquote(addr),parallel,ipv,port,omit,transmit,bitrate})
|
iperf = io.popen("iperf3 -c %s -P %s -%s -p %s -O %s -t %s -u -b %s -J" % {ut.shellquote(addr),parallel,ipv,port,omit,transmit,bitrate})
|
||||||
else
|
else
|
||||||
iperf = io.popen("iperf3 -c %s -P %s -%i -p %s -O %s -R -t %s -u -b %s -J" % {ut.shellquote(addr),parallel,ipv,port,omit,transmit,bitrate})
|
iperf = io.popen("iperf3 -c %s -P %s -%s -p %s -O %s -R -t %s -u -b %s -J" % {ut.shellquote(addr),parallel,ipv,port,omit,transmit,bitrate})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if iperf then
|
if iperf then
|
||||||
|
|
|
@ -123,12 +123,12 @@
|
||||||
<label class="cbi-value-title"><%:Target bitrate (Mbits/s)%></label>
|
<label class="cbi-value-title"><%:Target bitrate (Mbits/s)%></label>
|
||||||
<div class="cbi-value-field">
|
<div class="cbi-value-field">
|
||||||
<input name="bitrate" data-type="uinteger" type="text" class="cbi-input-text" value="0"/>
|
<input name="bitrate" data-type="uinteger" type="text" class="cbi-input-text" value="0"/>
|
||||||
</div>
|
|
||||||
<br />
|
<br />
|
||||||
<div class="cbi-value-description">
|
<div class="cbi-value-description">
|
||||||
<%:0 for unlimited. Need to be limited for UDP test%>
|
<%:0 for unlimited. Need to be limited for UDP test%>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
<div class="cbi-value">
|
<div class="cbi-value">
|
||||||
<label class="cbi-value-title"><%:Number of parallel client streams to run%></label>
|
<label class="cbi-value-title"><%:Number of parallel client streams to run%></label>
|
||||||
<div class="cbi-value-field">
|
<div class="cbi-value-field">
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue