adb shell free -m |grep -ai Mem |tr -d 'Mem:' |awk '{print int($2/$1*100)"%"}'
echo "CPU Usage: "$[100-$(adb shell vmstat 3 4|tail -1|awk '{print $15}')]"%"
![在这里插入图片描述](https://img-blog.csdnimg.cn/b4d3b7ad005044b9aff20036463b7dd9.png)
mem=`adb shell free -m |grep -ai Mem |tr -d 'Mem:' |awk '{print int($2/$1*100)"%"}'`
time=`date`
echo $mem,$time >>a.csv
![在这里插入图片描述](https://img-blog.csdnimg.cn/786ce5726c024c87a4948060b9bdbe3a.png)
![在这里插入图片描述](https://img-blog.csdnimg.cn/495f68b2ebee4314b6fc74f5ad5432ab.png)
adb shell ifconfig wlan0|egrep -E "TX packets|RX packets"|awk -F : '{print $2"kbs"}'|tr -d 'a-z'
![在这里插入图片描述](https://img-blog.csdnimg.cn/02d306f8765c4d36b5b21aea8055b5b8.png)
![在这里插入图片描述](https://img-blog.csdnimg.cn/798953cb06e64ee884791eae776c1d67.png)