os-vnstat: Show statistics separately for multiple interfaces
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
Read the os-vnstat plugin sources under src/opnsense/mvc/app/ first: the controller that assembles vnstat output, the Volt views behind the hourly/daily/monthly/yearly tabs, and the plugin's interface-selection settings. The payload shows the combined igc0+pppoe0+pppoe1 output, so check how vnstat is invoked with several -i arguments before splitting it per interface. Done means each statistics page offers a per-interface selector (plus an optional All view) while keeping the existing combined output available.
由索引模型根据 Issue 内容生成。
描述
Important notices
Before you add a new report, we ask you kindly to acknowledge the following:
-
I have read the contributing guide lines at https://github.com/opnsense/plugins/blob/master/CONTRIBUTING.md
-
I have searched the existing issues, open and closed, and I'm convinced that mine is new.
https://github.com/opnsense/plugins/issues/5955 -
When the request is meant for an existing plugin, I've added its name to the title.
Is your feature request related to a problem? Please describe.
When multiple interfaces are selected in os-vnstat, the statistics pages show a combined view. For example, selecting LAN (igc0), WAN1 (pppoe0) and WAN2 (pppoe1) displays igc0+pppoe0+pppoe1.
This makes it difficult to compare individual interface usage in the GUI, particularly for multi-WAN load balancing, failover and ISP usage monitoring. Combining LAN and WAN counters can also count the same traffic more than once as it passes through the firewall.
Describe the solution you'd like
Add an interface selector or tabs to the statistics pages so users can view hourly, daily, monthly and yearly statistics for each selected interface separately.
For example: LAN | WAN1 | WAN2 | All
The existing combined view could remain available as an optional All view.
Describe alternatives you've considered
I can view each interface separately from the command line using:
vnstat -i igc0 -h
vnstat -i pppoe0 -h
vnstat -i pppoe1 -h
root@onyx-fw:~ # vnstat --iflist
Available interfaces: igc0 (1000 Mbit) igc1 (1000 Mbit) igc2 (1000 Mbit) igc3 (10 Mbit) enc0 pflog0 pfsync0 pppoe0 pppoe1 zen0
root@onyx-fw:~ # vnstat -i igc0 -h
igc0 / hourly
hour rx | tx | total | avg. rate
------------------------+-------------+-------------+---------------
11/22/26
15:00 41.10 MiB | 56.89 MiB | 97.99 MiB | 228.33 kbit/s
16:00 5.78 GiB | 10.07 GiB | 15.85 GiB | 37.83 Mbit/s
17:00 227.31 MiB | 347.48 MiB | 574.79 MiB | 1.34 Mbit/s
18:00 981.19 MiB | 1.46 GiB | 2.42 GiB | 5.78 Mbit/s
19:00 431.93 MiB | 479.93 MiB | 911.86 MiB | 2.12 Mbit/s
20:00 3.19 GiB | 57.09 GiB | 60.28 GiB | 143.83 Mbit/s
21:00 1.60 GiB | 38.22 GiB | 39.83 GiB | 95.03 Mbit/s
22:00 920.94 MiB | 966.56 MiB | 1.84 GiB | 4.40 Mbit/s
23:00 28.18 MiB | 327.98 MiB | 356.16 MiB | 829.90 kbit/s
11/23/26
00:00 54.70 MiB | 1.47 GiB | 1.52 GiB | 3.62 Mbit/s
01:00 34.51 MiB | 755.65 MiB | 790.16 MiB | 1.84 Mbit/s
02:00 53.69 MiB | 1.22 GiB | 1.28 GiB | 3.05 Mbit/s
03:00 35.24 MiB | 848.96 MiB | 884.19 MiB | 2.06 Mbit/s
04:00 478.53 MiB | 1.01 GiB | 1.47 GiB | 3.52 Mbit/s
05:00 45.41 MiB | 19.18 MiB | 64.59 MiB | 150.50 kbit/s
06:00 239.06 MiB | 347.17 MiB | 586.24 MiB | 1.37 Mbit/s
07:00 57.46 MiB | 1.72 GiB | 1.78 GiB | 4.25 Mbit/s
08:00 531.24 MiB | 2.00 GiB | 2.52 GiB | 6.01 Mbit/s
09:00 56.55 MiB | 930.04 MiB | 986.59 MiB | 2.30 Mbit/s
10:00 154.98 MiB | 1.46 GiB | 1.61 GiB | 3.85 Mbit/s
11:00 46.85 MiB | 999.51 MiB | 1.02 GiB | 2.44 Mbit/s
12:00 499.99 MiB | 1.22 GiB | 1.71 GiB | 4.09 Mbit/s
13:00 55.03 MiB | 1.39 GiB | 1.44 GiB | 3.43 Mbit/s
14:00 68.89 MiB | 1.11 GiB | 1.18 GiB | 8.42 Mbit/s
------------------------+-------------+-------------+---------------
root@onyx-fw:~ # vnstat -i pppoe0 -h
pppoe0 / hourly
hour rx | tx | total | avg. rate
------------------------+-------------+-------------+---------------
11/22/26
15:00 41.51 MiB | 28.75 MiB | 70.26 MiB | 163.72 kbit/s
16:00 7.24 GiB | 3.96 GiB | 11.19 GiB | 26.71 Mbit/s
17:00 300.08 MiB | 63.43 MiB | 363.51 MiB | 847.03 kbit/s
18:00 0.98 GiB | 946.83 MiB | 1.91 GiB | 4.55 Mbit/s
19:00 470.60 MiB | 413.76 MiB | 884.36 MiB | 2.06 Mbit/s
20:00 3.44 GiB | 1.05 GiB | 4.49 GiB | 10.71 Mbit/s
21:00 352.87 MiB | 28.98 MiB | 381.85 MiB | 889.77 kbit/s
22:00 159.02 MiB | 25.97 MiB | 184.99 MiB | 431.06 kbit/s
23:00 21.59 MiB | 13.54 MiB | 35.13 MiB | 81.87 kbit/s
11/23/26
00:00 469.13 MiB | 24.05 MiB | 493.17 MiB | 1.15 Mbit/s
01:00 330.08 MiB | 20.42 MiB | 350.50 MiB | 816.73 kbit/s
02:00 618.41 MiB | 30.45 MiB | 648.86 MiB | 1.51 Mbit/s
03:00 808.58 MiB | 22.64 MiB | 831.22 MiB | 1.94 Mbit/s
04:00 554.62 MiB | 25.38 MiB | 580.01 MiB | 1.35 Mbit/s
05:00 18.30 MiB | 36.43 MiB | 54.73 MiB | 127.54 kbit/s
06:00 69.03 MiB | 14.26 MiB | 83.29 MiB | 194.09 kbit/s
07:00 94.66 MiB | 25.82 MiB | 120.48 MiB | 280.74 kbit/s
08:00 61.59 MiB | 23.35 MiB | 84.94 MiB | 197.92 kbit/s
09:00 34.29 MiB | 21.50 MiB | 55.79 MiB | 129.99 kbit/s
10:00 66.33 MiB | 122.26 MiB | 188.60 MiB | 439.46 kbit/s
11:00 27.14 MiB | 16.83 MiB | 43.97 MiB | 102.46 kbit/s
12:00 41.79 MiB | 19.78 MiB | 61.57 MiB | 143.47 kbit/s
13:00 99.65 MiB | 34.62 MiB | 134.27 MiB | 312.88 kbit/s
14:00 35.69 MiB | 37.65 MiB | 73.34 MiB | 512.68 kbit/s
------------------------+-------------+-------------+---------------
root@onyx-fw:~ # vnstat -i pppoe1 -h
pppoe1 / hourly
hour rx | tx | total | avg. rate
------------------------+-------------+-------------+---------------
11/22/26
15:00 17.27 MiB | 9.73 MiB | 27.00 MiB | 62.91 kbit/s
16:00 2.88 GiB | 1.73 GiB | 4.61 GiB | 10.99 Mbit/s
17:00 50.07 MiB | 160.05 MiB | 210.12 MiB | 489.61 kbit/s
18:00 482.47 MiB | 20.58 MiB | 503.05 MiB | 1.17 Mbit/s
19:00 9.47 MiB | 11.29 MiB | 20.77 MiB | 48.39 kbit/s
20:00 54.93 GiB | 1.68 GiB | 56.61 GiB | 135.07 Mbit/s
21:00 38.89 GiB | 1.28 GiB | 40.18 GiB | 95.86 Mbit/s
22:00 805.75 MiB | 886.04 MiB | 1.65 GiB | 3.94 Mbit/s
23:00 314.20 MiB | 19.49 MiB | 333.69 MiB | 777.55 kbit/s
11/23/26
00:00 1.01 GiB | 32.21 MiB | 1.04 GiB | 2.47 Mbit/s
01:00 428.38 MiB | 15.84 MiB | 444.22 MiB | 1.04 Mbit/s
02:00 630.36 MiB | 18.96 MiB | 649.33 MiB | 1.51 Mbit/s
03:00 40.41 MiB | 9.65 MiB | 50.06 MiB | 116.64 kbit/s
04:00 470.68 MiB | 443.68 MiB | 914.36 MiB | 2.13 Mbit/s
05:00 7.22 MiB | 8.56 MiB | 15.79 MiB | 36.79 kbit/s
06:00 280.10 MiB | 221.44 MiB | 501.54 MiB | 1.17 Mbit/s
07:00 1.62 GiB | 27.15 MiB | 1.65 GiB | 3.93 Mbit/s
08:00 1.93 GiB | 497.18 MiB | 2.41 GiB | 5.75 Mbit/s
09:00 898.60 MiB | 36.47 MiB | 935.06 MiB | 2.18 Mbit/s
10:00 1.39 GiB | 31.49 MiB | 1.42 GiB | 3.39 Mbit/s
11:00 974.60 MiB | 31.79 MiB | 0.98 GiB | 2.35 Mbit/s
12:00 1.18 GiB | 477.85 MiB | 1.65 GiB | 3.93 Mbit/s
13:00 1.28 GiB | 24.91 MiB | 1.30 GiB | 3.11 Mbit/s
14:00 1.07 GiB | 28.52 MiB | 1.09 GiB | 7.83 Mbit/s
------------------------+-------------+-------------+---------------
These commands return separate statistics, but require shell access. Selecting only one interface in the plugin is another workaround, but makes comparing multiple interfaces inconvenient.
Thank you for considering this enhancement.
Additional context
- OPNsense: 26.7.x
- os-vnstat: 1.4
- Interfaces: LAN (
igc0), WAN1 (pppoe0), WAN2 (pppoe1)
The vnStat commands above return separate statistics for all three interfaces, so the requested change appears to concern how the existing data is presented in the plugin GUI.
This replaces #5955, which was closed because it did not use an issue template. Screenshots and command output are available there.
- 主要语言
- PHP
- 星标
- 1.2k
- 派生
- 932
- 平均合并
- 1 天 11 小时
- 30 天内合并 PR
- 22
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
opnsense/plugins 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 85/100
维护者通常 1 天内回复
-
www/squid: configctl proxy stop returns before Squid exits, so stop+start (e.g. Monit restart) fails未关闭support
难度 2/5 1-3 小时 新手友好度 70/100
opnsense/plugins#5983 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 83/100
维护者通常 1 天内回复
-
net/haproxy: IPv6 literal in real server "Source address" generates an invalid `source` directive可能已有人在做 @fraenki 于 6 天前认领。 未关闭bug
难度 2/5 1-3 小时 新手友好度 68/100
opnsense/plugins#5973 · 1 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
-
[dns/ddclient] Support hiding unused standard fields per service (optional_hiding)可能已有人在做 @bringha1 于 9 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 70/100
Automattic/blocks-engine#7881 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 86/100
iruzen-dono/workless#117 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
magicsunday/webtrees-docker#285 ·
维护者通常 1 天内回复
-
area/tests type/bug when/soon
难度 2/5 1-3 小时 新手友好度 74/100
维护者通常 1 天内回复
-
WP-CLI 3.0 fixes the cron lock and core download bugs described in the handbook可能已有人在做 @mayankmajeji 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 85/100
WordPress/hosting-handbook#521 ·