Warning: session_start(): open(/tmp/sess_b5609a5bfeef629579afb22df7c15fbd, O_RDWR) failed: No space left on device (28) in /var/www/html/inc/init.php on line 265

Warning: session_start(): Failed to read session data: files (path: ) in /var/www/html/inc/init.php on line 265

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/inc/init.php:265) in /var/www/html/inc/auth.php on line 432

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/inc/init.php:265) in /var/www/html/inc/actions.php on line 38
routeros_wireless_client_logging [Ben's notes]

Ben's notes

Linux, Unix, network, radio...

User Tools

Site Tools


routeros_wireless_client_logging

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