mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
10 lines
412 B
Bash
Executable file
10 lines
412 B
Bash
Executable file
#!/bin/sh
|
|
|
|
ubus call openmptcprouter status | jsonfilter -e '@.wans[@.multipath!="off"]' | while read data; do
|
|
label=$(echo $data | jsonfilter -e '@.label')
|
|
latency=$(echo $data | jsonfilter -e '@.latency')
|
|
[ -n "$latency" ] && latency="${latency}ms"
|
|
whois=$(echo $data | jsonfilter -e '@.whois')
|
|
multipath=$(echo $data | jsonfilter -e '@.multipath')
|
|
echo "${label}: ${multipath} ${whois} ${latency}"
|
|
done
|