|
基本的绝对路径应该是简单的知识,上面的例子直接就放在了 / 根目录下面,至于放在哪里随意,只是需要对crontab -e时的路径进行相应的修改。
好久没用cc这种老版本了,可能真正有问题的是iw dev wlan0 station dump可能和现在的openwrt 18.04版本在格式上不一致,
下面这句的意思是输出每个mac地址第9行的信息,可能cc时是-A7,具体可以通过iw dev wlan0 station dump查看一下输出是否不一样。
for i in $(cat /tmp/mac.lst); do signal=`grep -A9 "$i" /tmp/mca_dump.out | sed -n "/signal/p" |grep -o "[0-9]\+" | head -1`
- root@3L5:/tmp# cat /tmp/mca_dump.out
- Station 78:11:dc:95:a9:b5 (on wlan1)
- inactive time: 760 ms
- rx bytes: 3291501
- rx packets: 12999
- tx bytes: 794521
- tx packets: 6180
- tx retries: 109
- tx failed: 1
- rx drop misc: 0
- <font color="#ff0000"> signal: -45 [-50, -51, -48] dBm</font>
- signal avg: -44 [-49, -50, -47] dBm
- tx bitrate: 135.0 MBit/s MCS 7 40MHz
- rx bitrate: 135.0 MBit/s MCS 7 40MHz
- expected throughput: 44.677Mbps
- authorized: yes
- authenticated: yes
- associated: yes
- preamble: short
- WMM/WME: yes
- MFP: no
- TDLS peer: no
- DTIM period: 2
- beacon interval:1000
- short preamble: yes
- short slot time:yes
- connected time: 5150 seconds
- Station bc:3a:ea:6a:b5:71 (on wlan1)
复制代码
|
|