tty228 / luci-app-wechatpush

A plugin for OpenWRT routers to send various information notifications to a mobile phone via WeChat or Telegram.
GNU General Public License v2.0
1.06k stars 372 forks source link

serverchan 总计流量不显示 #30

Closed QiuSimons closed 4 years ago

QiuSimons commented 4 years ago

这是什么bug,还是说需要什么特定的依赖啊 9A2C546B-8C4E-4811-BC36-C456C598173E

tty228 commented 4 years ago

流量统计依赖 luci-app-wrtbwmon ,自行选装 但是你的脚本并没有正常工作,即使不显示也应该是 0bytes 而且设备名没有显示

QiuSimons commented 4 years ago

流量统计依赖 luci-app-wrtbwmon ,自行选装 但是你的脚本并没有正常工作,即使不显示也应该是 0bytes 而且设备名没有显示

emm,装上了依赖还是有问题,是还有其他依赖么,我是基于官方正式版的19.07.0编译的

QiuSimons commented 4 years ago

流量统计依赖 luci-app-wrtbwmon ,自行选装 但是你的脚本并没有正常工作,即使不显示也应该是 0bytes 而且设备名没有显示

9F110D8D-EB25-47D8-BD7F-BA6D8BB3865C 最新的commit似乎可以工作了,但中间有个断行,很奇怪

tty228 commented 4 years ago

你运行一下 cat /var/dhcp.leases 命令,你的设备名都不能获取的吗 断行也应该是设备名导致的格式问题

SimonsQiu commented 4 years ago

cat /var/dhcp.leases

微信截图_20200120134311

binext commented 4 years ago

如果设备是二级路由上过来的,会获取不到设备名

QiuSimons commented 4 years ago

如果设备是二级路由上过来的,会获取不到设备名

没有二级路由,很奇怪.... 还有就是在线设备中间有个奇怪断层很迷

binext commented 4 years ago

如果设备是二级路由上过来的,会获取不到设备名

没有二级路由,很奇怪.... 还有就是在线设备中间有个奇怪断层很迷

那就奇怪全部获取不到设备名的问题了, 那个推送中间有个断层,我也出现了。。。

Screenshot_20200201_125400_com tencent mm

for  ip in $IPLIST; do
                send_content=${send_content}"%0D%0A%0D%0A""     $ip  "
                ip_total=`usage_ip $ip`
                time_down=`date +%s`
                time_up=$( cat ${dir}ipAddress | grep -w $ip |awk '{print $4}' | grep -v "^$" | sort -u )
                time1=$(($time_down-$time_up))
                time1=`time_for_humans $time1`
                send_content=${send_content}"`cat ${dir}ipAddress | grep "$ip" | awk  '{print $3}' | grep -v "^$" | sort -u`%0D%0A%0D%0A""     总计流量:$ip_total  在线 $time1"
            done

代码分隔得还是有点问题

tty228 commented 4 years ago

你的断行目测应该是我忘了全字匹配 10.0.0.10跟10.0.0.100读取到两行了

binext commented 4 years ago

你的断行目测应该是我忘了全字匹配 10.0.0.10跟10.0.0.100读取到两行了

OK,fixed

QiuSimons commented 4 years ago

谢谢,新编译的我这儿没有这个问题了

ASC8384 commented 2 years ago

流量统计依赖 luci-app-wrtbwmon ,自行选装 但是你的脚本并没有正常工作,即使不显示也应该是 0bytes 而且设备名没有显示

您好,我安装了luci-app-wrtbwmon后,依旧没有流量显示,请问该如何解决? 查阅系统进程,有{wrtbwmon} /bin/sh /usr/sbin/wrtbwmon -46 -f /tmp/usage.db -p /tmp/usage.htm -u /etc/wrtbwmon.user -d,版本号为git-22.147.57852-d7e4f23luci-app-wrtbwmon版本号为git-22.174.44819-ca01673

图片