Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

这两天频繁更新呀,给力! #283

Open
aguowork opened this issue Jul 5, 2024 · 5 comments
Open

这两天频繁更新呀,给力! #283

aguowork opened this issue Jul 5, 2024 · 5 comments

Comments

@aguowork
Copy link

aguowork commented Jul 5, 2024

能加入一分钟提醒上传和下载流量就好了,单独分开

客户端名: xxxxxxx
客户端IP: 192.168.1.219
客户端MAC: xxxxxxxxxxxxx
总计流量: 65.23 MB
一分钟内总流量: 6.00 MB
一分钟内上传流量: 2.50 MB
一分钟内下载流量: 3.50 MB
在线时间: 55 分 0 秒

@tty228
Copy link
Owner

tty228 commented Jul 5, 2024

印象里 wrtbwmon 不支持这个功能

@aguowork
Copy link
Author

aguowork commented Jul 5, 2024

文件root/usr/share/wechatpush/wechatpush中的位置

[ -z "$total_n" ] && total_n=$(cat ${dir}usage.db | head -n1 | grep "total" | sed 's/,/\n/g' | awk '/total/{print NR}') 2>/dev/null
[ -z "$total_n" ] && total_n="6"
第6是总流量
#mac,ip,iface,speed_in,speed_out,in,out,total,first_date,last_date
mac,ip,br-lan,538946,18294,179039661,31448118,210487779,1720182440,1720184120

我仔细研究了下,感觉可以在这里实现,旁边也有上传和下载的,看你是写到client_usage_aliases和old_client_usage_aliases文件

@tty228
Copy link
Owner

tty228 commented Jul 5, 2024

你说的是 设备异常流量警报 那个吗?

@aguowork
Copy link
Author

aguowork commented Jul 5, 2024

单独整个开关来控制上传下载流量提醒超出认知范围了,只能大佬您来了,我想不到那么高级的 哈哈。
设备异常流量警报这里了,改了一下应该可以,client_usage_aliases和old_client_usage_aliases文件有数据,可以整出来对比,这样更加详细了,一分钟的流量能知道上传下载各多少。

aguowork@0e2f3c0
整了一下,运行起来提示wechatpush未运行,还是大佬您来吧,我太菜了 哈哈!!!

@tty228
Copy link
Owner

tty228 commented Jul 6, 2024

网页上显示未运行其实是正常的情况
必须通过 /etc/init.d/wechatpush start 启动程序,web 上才会收到服务已启动的通告
直接调用 bash /usr/share/wechatpush/wechatpush 是接收不到状态的
这个晚点再弄吧,我这 wrtbwmon 没法用,好久没碰了,有点陌生

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants