routeros_wireless_client_logging
Table of Contents
RouterOS - log wireless clients
Create script
add name=wifi-clients edit 0 source
/int wire reg :foreach i in=[find] do={ :local mc [get $i mac-address]; :local ip [get $i last-ip]; :local rx [get $i rx-rate]; :local tx [get $i tx-rate]; :local up [get $i uptime]; :local la [get $i last-activity]; :local ss [get $i signal-strength]; :local sn [get $i signal-to-noise]; :local tq [get $i tx-ccq]; :local by [get $i bytes]; :local pk [get $i packets]; :local rq [get $i rx-ccq]; :local rv [get $i routeros-version]; :local pt [get $i p-throughput]; :local ts [get $i tx-signal-strength]; :log info ([/system identity get name].",CLIENT,".$mc.",".$ip.",".$rx.",".$tx.",".$up.",".$la.",".$ss.",".$sn.",".$tq.",".$by.",".$pk.",".$rq.",".$rv.",".$pt.",".$ts); }
Test run
/system script run 0 /log print
23:40:14 script,info apname,CLIENT,01:23:45:67:89:01,1.2.3.4,130.0Mbps,130.0Mbps,00:38:43,00:00:00,-58dBm@6Mbps,51,96,781586749,13922691,523085,210972,,,68035, 23:40:14 script,info apname,CLIENT,01:23:45:67:89:01,1.2.3.5,150.0Mbps,150.0Mbps,00:03:23,00:00:00.770,-49dBm@HT40-7,60,93,69640,85709,723,698,,,94465,
Log every minute from scheduler
/system scheduler add name=wifi-clients-log interval=1m on-event=wifi-clients
routeros_wireless_client_logging.txt · Last modified: 2021/10/09 15:14 by 127.0.0.1