Community discussions

 
411ah
just joined
Topic Author
Posts: 14
Joined: Tue Jan 24, 2012 5:21 pm

How to log Wireless Registration table information locally

Fri Mar 09, 2012 4:56 pm

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.
 
User avatar
Ibersystems
Forum Guru
Forum Guru
Posts: 1681
Joined: Wed Apr 12, 2006 12:29 am
Location: Cabrils, Barcelona - Spain
Contact:

Re: How to log Wireless Registration table information local

Fri Mar 09, 2012 6:06 pm

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
Martín
martinruiz at ibersystems.es
Experto en redes WiFi y enlaces WiFi.

Facebook: @Ibersystems
Twitter: @Ibersystems

Certified in Traffic Shaping, Wireless, Internetworking, Routing and User Management.
MTCTCE - MTCWE - MTCINE - MTCUME - MTCRE
 
411ah
just joined
Topic Author
Posts: 14
Joined: Tue Jan 24, 2012 5:21 pm

Re: How to log Wireless Registration table information local

Fri Mar 09, 2012 9:07 pm

Thank you very much! That was very helpful.

I just had one more question; how would I make it log the results more frequently?
 
User avatar
Ibersystems
Forum Guru
Forum Guru
Posts: 1681
Joined: Wed Apr 12, 2006 12:29 am
Location: Cabrils, Barcelona - Spain
Contact:

Re: How to log Wireless Registration table information local

Fri Mar 09, 2012 9:39 pm

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..
Martín
martinruiz at ibersystems.es
Experto en redes WiFi y enlaces WiFi.

Facebook: @Ibersystems
Twitter: @Ibersystems

Certified in Traffic Shaping, Wireless, Internetworking, Routing and User Management.
MTCTCE - MTCWE - MTCINE - MTCUME - MTCRE
 
411ah
just joined
Topic Author
Posts: 14
Joined: Tue Jan 24, 2012 5:21 pm

Re: How to log Wireless Registration table information local

Fri Mar 09, 2012 10:00 pm

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?
 
User avatar
Ibersystems
Forum Guru
Forum Guru
Posts: 1681
Joined: Wed Apr 12, 2006 12:29 am
Location: Cabrils, Barcelona - Spain
Contact:

Re: How to log Wireless Registration table information local

Fri Mar 09, 2012 10:06 pm

In system logging, set "info" write to disk.
But this will log ALL.

Better use a syslog server.
Martín
martinruiz at ibersystems.es
Experto en redes WiFi y enlaces WiFi.

Facebook: @Ibersystems
Twitter: @Ibersystems

Certified in Traffic Shaping, Wireless, Internetworking, Routing and User Management.
MTCTCE - MTCWE - MTCINE - MTCUME - MTCRE
 
411ah
just joined
Topic Author
Posts: 14
Joined: Tue Jan 24, 2012 5:21 pm

Re: How to log Wireless Registration table information local

Fri Mar 09, 2012 10:26 pm

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?
 
411ah
just joined
Topic Author
Posts: 14
Joined: Tue Jan 24, 2012 5:21 pm

Re: How to log Wireless Registration table information local

Fri Mar 09, 2012 10:35 pm

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?
 
411ah
just joined
Topic Author
Posts: 14
Joined: Tue Jan 24, 2012 5:21 pm

Re: How to log Wireless Registration table information local

Fri Mar 09, 2012 10:50 pm

Okay I figured it out. For anyone interested you can change the number of lines each log contains, default is set to 100.
 
plisken
Forum Guru
Forum Guru
Posts: 2399
Joined: Sun May 15, 2011 12:24 am
Location: Belgium
Contact:

Re: How to log Wireless Registration table information local

Sun Aug 23, 2015 1:03 pm

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?
 
User avatar
Ibersystems
Forum Guru
Forum Guru
Posts: 1681
Joined: Wed Apr 12, 2006 12:29 am
Location: Cabrils, Barcelona - Spain
Contact:

Re: How to log Wireless Registration table information locally

Mon Aug 24, 2015 2:31 pm

emailing the [$total] parameter.

/tool e-mail send to=you@yourdomain.com subject="test" body=[$total] something like that
Martín
martinruiz at ibersystems.es
Experto en redes WiFi y enlaces WiFi.

Facebook: @Ibersystems
Twitter: @Ibersystems

Certified in Traffic Shaping, Wireless, Internetworking, Routing and User Management.
MTCTCE - MTCWE - MTCINE - MTCUME - MTCRE

Who is online

Users browsing this forum: No registered users and 10 guests