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
ADahi
September 4, 2018, 2:29am
2
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?
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
ADahi
September 6, 2018, 9:42am
4
punch Accept this answer
: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…”}
ADahi
September 6, 2018, 10:34pm
6
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!!
ADahi
September 7, 2018, 4:40am
8
thank you very much really!!
I know you’d do the same for me.
Jotne
September 7, 2018, 5:26am
9
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.
ADahi
September 7, 2018, 6:39am
10
post updated, you’re right
thanks
Hi @ADahi You know that I was testing the script, but it is not working, when the RX falls it does run.
ADahi
September 11, 2018, 3:14am
12
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,
ADahi
September 11, 2018, 5:20pm
14
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