Script for logging max distance on wireless interface V6

Hi Scripting Gurus,

i really need your help.

I need to log the “Distance” value that shows in the wireless interface Status page in winbox when it goes over a pre threshold value eg: 4km.

i only need the one overall value in the status page, i dont need each individual clients values

karma waiting to be awarded.

many thanks in advance

i only need the one overall value in the status page
What do you want?
On what status page?

You can see the distance only of the NV2 connections!

Syntax for 6.7+

:local tmpDistance value=0;
:local isOver value=0;
:foreach i in=[/interface wireless registration-table find] do={
 :set $tmpDistance value=[/interface wireless registration-table get value-name=distance $i];
 :if (($tmpDistance + 0) > 4) do={ :set $isOver value=1; };
}

You can put all controls you want in the script.
At the end of the cycle, if one value are > of 4km, the variable isOver are = 1

distance.PNG

Hi in winbox

wireless - Interfaces - Wlan1 - Status
distance.PNG

You see the reply?

Read before your post :wink:

Also, if this

[:len [/interface wireless registration-table find where distance>4]]

are > 0, then one or more are at distance > 4

eheheheh…


The previous script, are the base for logging, display the longest distance, etc.

yes thank you but i think this checks every client right?

Yes, and again I made a post before your reply

read my previous post :wink:

explain better this for who read this topic:

:local test value=[:len [/interface wireless registration-table find where distance>4]];

if test > 0 one or more client are connected with distance > 4

Any news?

hi,

thats great thanks, I can work with this karma on way

I’m happy because I have understand your needs.

By.