diff --git a/luci-mod-admin-full/luasrc/controller/admin/network.lua b/luci-mod-admin-full/luasrc/controller/admin/network.lua index b782ccbe0..aa86c184e 100644 --- a/luci-mod-admin-full/luasrc/controller/admin/network.lua +++ b/luci-mod-admin-full/luasrc/controller/admin/network.lua @@ -153,6 +153,9 @@ function index() page = entry({"admin", "network", "diag_traceroute6"}, post("diag_traceroute6"), nil) page.leaf = true + page = entry({"admin", "network", "diag_iperf3"}, post("diag_iperf3"), nil) + page.leaf = true + page = entry({"admin", "network", "diag_speedtest"}, post("diag_speedtest"), nil) page.leaf = true -- end @@ -431,6 +434,10 @@ function diag_traceroute6(addr) diag_command("traceroute6 -q 1 -w 2 -n %q 2>&1", addr) end +function diag_iperf3(addr) + diag_command("iperf3 -c %q 2>&1", addr) +end + function diag_speedtest(addr) if addr then diag_command("speedtestc --server %q 2>&1", addr) diff --git a/luci-mod-admin-full/luasrc/view/admin_network/diagnostics.htm b/luci-mod-admin-full/luasrc/view/admin_network/diagnostics.htm index 884e28f40..6243b536c 100644 --- a/luci-mod-admin-full/luasrc/view/admin_network/diagnostics.htm +++ b/luci-mod-admin-full/luasrc/view/admin_network/diagnostics.htm @@ -10,10 +10,12 @@ local fs = require "nixio.fs" local has_ping6 = fs.access("/bin/ping6") or fs.access("/usr/bin/ping6") local has_traceroute6 = fs.access("/usr/bin/traceroute6") local has_speedtest = fs.access("/usr/sbin/speedtestc") +local has_iperf3 = fs.access("/usr/bin/iperf3") local dns_host = luci.config.diag and luci.config.diag.dns or "dev.openwrt.org" local ping_host = luci.config.diag and luci.config.diag.ping or "dev.openwrt.org" local route_host = luci.config.diag and luci.config.diag.route or "dev.openwrt.org" +local iperf3_host = luci.config.diag and luci.config.diag.iperf3 or "ping-ams1.online.net" %> @@ -102,13 +104,20 @@ local route_host = luci.config.diag and luci.config.diag.route or "dev.openwrt.o - <% if has_speedtest then %> + <% if has_speedtest and false then %>