Hello everyone,
I've always used the "monitor" command to get the rate value of an Ethernet port via script with the "once" directive. However, on my 7.21 router, this doesn't terminate automatically but remains active, so the script isn't able to finish. I'm just inserting the relevant part. If I manually press q during execution, the script continues.
:local INTERFACES {"eth4_WAN1"="1Gbps";"eth5_WAN2"="1Gbps"}
:foreach i,v in=$INTERFACES do={
/interface ethernet monitor $i once do={
:if ($rate != $v) do={
:set msg ($msg . $i . " INTERFACE (bad alignment " . $v . ")\n")
:set logMsg ($logMsg . $i . " INTERFACE (bad alignment " . $v . ")\n")
} else={
:set logMsg ($logMsg . $i . " INTERFACE (good alignment " . $v . ")\n")
}
}
}