-
-
Notifications
You must be signed in to change notification settings - Fork 364
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
vnstat 配置 MonthRotate 为非 1 的天数后,当前月份流量特定时间内会错误显示为 0.00G | 0.00G #99
Comments
|
❯ vnstat -m
eth0 / monthly
month rx | tx | total | avg. rate
------------------------+-------------+-------------+---------------
2022-03 112.38 GiB | 100.19 GiB | 212.57 GiB | 681.72 kbit/s
2022-04 94.12 GiB | 109.97 GiB | 204.09 GiB | 676.37 kbit/s
2022-05 71.68 GiB | 84.98 GiB | 156.66 GiB | 502.41 kbit/s
2022-06 85.67 GiB | 68.26 GiB | 153.93 GiB | 510.13 kbit/s
2022-07 58.07 GiB | 33.68 GiB | 91.75 GiB | 294.25 kbit/s
2022-08 35.11 GiB | 25.75 GiB | 60.86 GiB | 195.19 kbit/s
2022-09 34.77 GiB | 21.53 GiB | 56.31 GiB | 186.60 kbit/s
2022-10 20.39 GiB | 9.35 GiB | 29.73 GiB | 95.36 kbit/s
------------------------+-------------+-------------+---------------
estimated 31.59 GiB | 14.48 GiB | 46.08 GiB |
❯ vnstat -d 21
eth0 / daily
day rx | tx | total | avg. rate
------------------------+-------------+-------------+---------------
2022-10-17 731.98 MiB | 135.46 MiB | 867.44 MiB | 84.22 kbit/s
2022-10-18 691.62 MiB | 135.83 MiB | 827.45 MiB | 80.34 kbit/s
2022-10-19 698.00 MiB | 161.92 MiB | 859.92 MiB | 83.49 kbit/s
2022-10-20 688.36 MiB | 139.73 MiB | 828.09 MiB | 80.40 kbit/s
2022-10-21 747.63 MiB | 139.54 MiB | 887.17 MiB | 86.14 kbit/s
2022-10-22 749.18 MiB | 139.24 MiB | 888.42 MiB | 86.26 kbit/s
2022-10-23 737.18 MiB | 167.20 MiB | 904.38 MiB | 87.81 kbit/s
2022-10-24 727.15 MiB | 140.01 MiB | 867.16 MiB | 84.19 kbit/s
2022-10-25 759.93 MiB | 140.37 MiB | 900.30 MiB | 87.41 kbit/s
2022-10-26 1.25 GiB | 321.85 MiB | 1.57 GiB | 155.77 kbit/s
2022-10-27 1.28 GiB | 480.07 MiB | 1.75 GiB | 174.05 kbit/s
2022-10-28 748.75 MiB | 325.86 MiB | 1.05 GiB | 104.33 kbit/s
2022-10-29 1.61 GiB | 1.40 GiB | 3.01 GiB | 299.46 kbit/s
2022-10-30 801.00 MiB | 229.50 MiB | 1.01 GiB | 100.05 kbit/s
2022-10-31 724.66 MiB | 140.12 MiB | 864.79 MiB | 83.96 kbit/s
2022-11-01 758.46 MiB | 202.03 MiB | 960.49 MiB | 93.25 kbit/s
2022-11-02 2.15 GiB | 1.57 GiB | 3.72 GiB | 369.90 kbit/s
2022-11-03 0.98 GiB | 424.06 MiB | 1.40 GiB | 138.99 kbit/s
2022-11-04 1.17 GiB | 595.53 MiB | 1.75 GiB | 173.82 kbit/s
2022-11-05 1.60 GiB | 1.04 GiB | 2.64 GiB | 262.23 kbit/s
2022-11-06 1.73 GiB | 1.54 GiB | 3.27 GiB | 899.15 kbit/s
------------------------+-------------+-------------+---------------
estimated 4.79 GiB | 4.25 GiB | 9.04 GiB | 这台机器配置的 以下是 {
"vnstat": true,
"network_rx": 7224,
"network_tx": 2379,
"network_in": 549957633026,
"network_out": 487166824728,
"last_network_in": 549957633026,
"last_network_out": 487166824728,
"latest_ts": 1667723944
} 我的理解是 我查到
|
扫了一下
|
v1.5.7 版本,适配了 vnstat month rotate 逻辑,用法 # 可选范围 1..28,要跟 vnstat.conf 配置 MonthRotate 对齐
./stat_client -n --vnstat-mr 7 |
更新服务端到 v1.5.7 后,使用一键部署更新客户端并应用
month rx | tx | total | avg. rate
------------------------+-------------+-------------+---------------
2022-10 27.81 GiB | 13.80 GiB | 41.62 GiB | 133.46 kbit/s
------------------------+-------------+-------------+--------------- |
有一些机器上的流量不是按自然月刷新的,比如在15日刷新并且将
vnstat
的MonthRotate
也配置为15,那么在15日之前vnstat --json m
返回的数据会存在不包含当前自然月流量信息的情况,导致 ServerStatus-Rust 显示的月流量为 0.00G | 0.00G.vnstat json 输出样例 (省略中间部分月份)
stat_server 版本:
stat_client 版本:
The text was updated successfully, but these errors were encountered: