Page 1 of 1

How to log Wireless Registration table information locally

Posted: Fri Mar 09, 2012 4:56 pm
by 411ah
Hello all,

I wanted to log Tx/Rx signal strenght, Tx/Rx CCQ, Signal to Noise and some other parameter from Wireless Registration Table in a log file stored locally. I would like to log the paramaters on a periodic interval. If anyone could guide me on how to go about proceeding with this it would be very helpful.

Re: How to log Wireless Registration table information local

Posted: Fri Mar 09, 2012 6:06 pm
by Ibersystems
Hello,

I don't have too much time, but I had a script that logged the signals of a wifi-N link and show it to /log. I hope you can modify it to get it working as you need:
:local valor1;
:local valor2;
:local valor3;
:local tx;
:local rx;
:local total;
:set valor1 [/interface wireless registration-table get number=0 signal-strength]
:set valor2 [/interface wireless registration-table get number=0 signal-strength-ch0]
:set valor3 [/interface wireless registration-table get number=0 signal-strength-ch1]
:set tx [/interface wireless registration-table get number=0 tx-rate]
:set rx [/interface wireless registration-table get number=0 rx-rate]
:set total ([$valor1]."                                  CH0 es ".[$valor2]." y CH1 es  ".[$valor3]."  Rates teoricos  tx ".[$tx]." y rx ".[$rx])
:log info [$total]
Picture here: http://screencast.com/t/Bie8yaMx

Re: How to log Wireless Registration table information local

Posted: Fri Mar 09, 2012 9:07 pm
by 411ah
Thank you very much! That was very helpful.

I just had one more question; how would I make it log the results more frequently?

Re: How to log Wireless Registration table information local

Posted: Fri Mar 09, 2012 9:39 pm
by Ibersystems
This is a script. To run a script, you have to add a scheduler in system/scheduler. Then, there you can configure the time you want to run the script. 1x hour, 1 per minute.. etc..

Re: How to log Wireless Registration table information local

Posted: Fri Mar 09, 2012 10:00 pm
by 411ah
Sorry to bother again, I had another question. Is there a way to put the log file on the C drive for example and have it write over there?

Re: How to log Wireless Registration table information local

Posted: Fri Mar 09, 2012 10:06 pm
by Ibersystems
In system logging, set "info" write to disk.
But this will log ALL.

Better use a syslog server.

Re: How to log Wireless Registration table information local

Posted: Fri Mar 09, 2012 10:26 pm
by 411ah
Thank you for your help thus far. I change the settings so it would write on the disk but when I open the file using notepad its a mess. Is there a way to force every new log entry to start at the next line?

Re: How to log Wireless Registration table information local

Posted: Fri Mar 09, 2012 10:35 pm
by 411ah
Nevermind Notepad++ displays the logs much better. But now there is another issue:

Once the log file reaches 16.5KiB it overwrites itself. Is there a way to allow it to continue logging?

Re: How to log Wireless Registration table information local

Posted: Fri Mar 09, 2012 10:50 pm
by 411ah
Okay I figured it out. For anyone interested you can change the number of lines each log contains, default is set to 100.

Re: How to log Wireless Registration table information local

Posted: Sun Aug 23, 2015 1:03 pm
by plisken
Hello,

I don't have too much time, but I had a script that logged the signals of a wifi-N link and show it to /log. I hope you can modify it to get it working as you need:
:local valor1;
:local valor2;
:local valor3;
:local tx;
:local rx;
:local total;
:set valor1 [/interface wireless registration-table get number=0 signal-strength]
:set valor2 [/interface wireless registration-table get number=0 signal-strength-ch0]
:set valor3 [/interface wireless registration-table get number=0 signal-strength-ch1]
:set tx [/interface wireless registration-table get number=0 tx-rate]
:set rx [/interface wireless registration-table get number=0 rx-rate]
:set total ([$valor1]."                                  CH0 es ".[$valor2]." y CH1 es  ".[$valor3]."  Rates teoricos  tx ".[$tx]." y rx ".[$rx])
:log info [$total]
Picture here: http://screencast.com/t/Bie8yaMx

How to use this script with email tool?

Re: How to log Wireless Registration table information locally

Posted: Mon Aug 24, 2015 2:31 pm
by Ibersystems
emailing the [$total] parameter.

/tool e-mail send to=you@yourdomain.com subject="test" body=[$total] something like that