Script to compare RX-Rate?

Hello everyone!

I am looking for a script that compares the RX-Rate of wlan1 with a specific number and according to that execute another script, does someone help me? I was trying to do it but I can’t find the correct parameters.

thousands of thanks

hi
I can help you, but explain more detail, what you want to do
now you got RX of each station

:do {
:foreach WR in=[/interface wireless registration-table find] do={
 :log info [/interface wireless registration-table get $WR rx-rate]
 }
} on-error={}

now, what next?

Hello! sorry for the delay!
I need the script to compare the RX-RATE with the number 20 and if it is less than 20, execute the Script2 and if it is bigger than 20 do not do anything. it is understood?

Thank you

punch Accept this answer :check_mark: :wink:

:do {
:foreach WR in=[/interface wireless registration-table find] do={
 :local R [/interface wireless registration-table get $WR rx-rate];
 :local X [:pick $R 0 [:find $R "M"]] 
 :if ($X < "20") do={
 :log warning message=("Found rx-rate=" . $X . "Mbps");
 #
 # your custom script here
 #
 }
}} on-error={:log error message="script failed..."}

Can work like this?

:do {
:foreach WR in=[/interface wireless registration-table find] do={
:local R [/interface wireless registration-table get $WR rx-rate];
:local X [:pick $R 0 [:find $R “M”]]
:if ($X < “20”) do={
:log warning message=(“Found rx-rate=” . $X . “Mbps”);
/interface wireless disable 1
/interface wireless enable 1
}
}} on-error={:log error message=“script failed…”}

Can work like this?

:do {
:foreach WR in=[/interface wireless registration-table find] do={
:local R [/interface wireless registration-table get $WR rx-rate];
:local X [:pick $R 0 [:find $R “M”]]
:if ($X < “20”) do={
:log warning message=(“Found rx-rate=” . $X . “Mbps”);
/interface wireless disable 1
/interface wireless enable 1
}
}} on-error={:log error message=“script failed…”}

work like that:

:do {
:foreach WR in=[/interface wireless registration-table find] do={
 :local R [/interface wireless registration-table get $WR rx-rate];
 :local X [:pick $R 0 [:find $R "M"]] 
 :if ($X < "20") do={
 :log warning message=("Found rx-rate=" . $X . "Mbps");
 :do {/interface wireless
  set wlan1 disabled=yes;
  :delay 3s;
  set wlan1 disabled=no;
  } on-error={:log error message="failed..."}
 }
}} on-error={:log error message="script failed..."}

thank you very much really!!

thank you very much really!!

I know you’d do the same for me. :wink:

No need to quote each others post. Makes it hard to read the thread.
Use Post Reply button at the bottom of the post.
If you need to quote, quote just the part that you need to explain.

post updated, you’re right
thanks :slight_smile:

Hi @ADahi You know that I was testing the script, but it is not working, when the RX falls it does run. :frowning:

script will work if found station with rx-rate less than 20 Mbps in wireless registration table

Hi, I put this in client cpe, and it does not work, will it take the value in another format? when the cpe falls below 20 it does not restart,

can you show us the output

it does not show me anything in the output, it does not indicate error or anything, I paste it in the console and nothing. the equipment is a sxt lite ac