caiwang / board2ihost

0 stars 0 forks source link

[CLOSED] active station #16

Open caiwang opened 9 years ago

caiwang commented 9 years ago

Issue by unissoft-bj Friday Jan 23, 2015 at 10:01 GMT Originally opened as https://github.com/caiwang/ihostsrc/issues/16


active station in last 900 seconds:

echo "DROP TABLE IF EXISTS z_activesta;" | mysql -uroot -p0ffs4t? wlsp echo "Create table z_activesta(select mac, rssi, sender,netid, firstseen,timestampdiff(second,firstseen,lastseen) as dura, optime as timebysec, SUBSTRING(optime,1,16) as timebymin from wlsta where timestampdiff(second,lastseen,now())<='900' and timestampdiff(second,firstseen,lastseen)>0);" | mysql -uroot -p0ffs4t? wlsp

echo "select mac,avg(rssi) as avgrssi,netid,timebymin from z_activesta where netid='ihost-xx' group by mac,netid,timebymin;" | mysql -uroot -p0ffs4t? wlsp > activesta1.txt

echo "select mac,avg(rssi) as avgrssi,netid,timebysec from z_activesta where netid='ihost-xx' group by mac,netid,timebysec;" | mysql -uroot -p0ffs4t? wlsp > activesta2.txt

image

image

caiwang commented 9 years ago

Comment by unissoft-bj Friday Jan 23, 2015 at 10:03 GMT


acitve station after a given point of time:

echo "DROP TABLE IF EXISTS z_activesta;" | mysql -uroot -p0ffs4t? wlsp echo "Create table z_activesta(select mac, rssi, sender,netid, firstseen,timestampdiff(second,firstseen,lastseen) as dura, optime as timebysec, SUBSTRING(optime,1,16) as timebymin from wlsta where lastseen >= '2015-01-23 17:30:00' and timestampdiff(second,firstseen,lastseen)>0);" | mysql -uroot -p0ffs4t? wlsp

echo "select mac,avg(rssi) as avgrssi,netid,timebymin from z_activesta where netid='ihost-xx' group by mac,netid,timebymin;" | mysql -uroot -p0ffs4t? wlsp > activesta3.txt echo "select mac,avg(rssi) as avgrssi,netid,timebysec from z_activesta where netid='ihost-xx' group by mac,netid,timebysec;" | mysql -uroot -p0ffs4t? wlsp > activesta4.txt

image

image