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 %>

<% end %> + <% if has_iperf3 then %> +
+
+ +
+ <% end %> +

diff --git a/omr-tracker/files/bin/omr-tracker b/omr-tracker/files/bin/omr-tracker index 0d14520e2..89c34c9fc 100755 --- a/omr-tracker/files/bin/omr-tracker +++ b/omr-tracker/files/bin/omr-tracker @@ -125,6 +125,7 @@ while true; do if [ -d "/sys/class/net/$OMR_TRACKER_DEVICE" ]; then # retrieve iface ip and gateway OMR_TRACKER_DEVICE_IP=$(ip -4 -br addr ls dev "$OMR_TRACKER_DEVICE" | awk -F'[ /]+' '{print $3}') + #OMR_TRACKER_DEVICE_IP=$(ubus call network.interface.$OMR_TRACKER_INTERFACE status | jsonfilter -e '@["ipv4-address"][0].address' | tr -d "\n") if [ -z "$OMR_TRACKER_DEVICE_GATEWAY" ]; then OMR_TRACKER_DEVICE_GATEWAY=$(ip -4 r list dev "$OMR_TRACKER_DEVICE" | grep -v default | awk '/proto static/ {print $1}' | tr -d "\n") fi