Logging Average CCQ and Wireless Clients Stats
This simple little script logs the specified wireless interface's overall ccq, noise floor, and frequencies. Very useful if you set this up on a scheduler, say each minute and syslog it to a remote server for parsing/graphing etc. Also handy for remembering what your frequency was set at previously
/int wir monitor [find name=wlan1] once do {
- env; :log info ([/system identity get name] . "," . $clients . "," . $overall-tx-ccq . "," . $noise-floor . "," . $frequency . "," . $current-tx-powers);
}
Sample output
Feb 8 11:53:40 64.114.36.194 script,info AP.Antar,32,62,-92,2412,1Mbps:18,2Mbps:18,5.5Mbps:18,11Mbps:18
This second script parses mac, last ip address, tx rates, uptime, last activity, snr etc... of each connected wireless client. Just be sure to change the interface= to your interface name. I usually set this one up on a 5 minute schedule. Good for matching IP/Mac Pairs
- foreach i in=[ /int wir reg find interface=wlan1] do={
- log info ([/system identity get name] . "," . [get $i mac-address ] . "," . [get $i last-ip] . "," . [get $i rx-rate] . "," . [get $i tx-rate] . "," . [get $i uptime] . "," . [get $i last-activity] . "," . [get $i signal-strength] . "," . [get $i signal-to-noise] . "," . [get $i tx-ccq] . "," . [get $i bytes] . "," . [get $i packets])
}
Sample Output Feb 8 11:54:09 64.114.107.251 script,info AP.Grizz,00:02:6F:34:2E:1C,64.114.107.149,11Mbps,11Mbps,3w4d15:50:58,00:00:00.010,-56dBm@11Mbps,36,100,3485064358,828420047,3532238,2666063