-
Notifications
You must be signed in to change notification settings - Fork 660
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
net/vnstat: Handle multiple interfaces better #4443
base: master
Are you sure you want to change the base?
Changes from all commits
4995dcb
c8697dc
2903e63
0d849ef
b59f9b0
81b8215
ced7a58
371b95d
c217fbb
aac8ec4
5f53d28
17978c9
790583a
f733359
2bd5355
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,13 @@ | |
<id>general.interface</id> | ||
<label>Interface</label> | ||
<type>select_multiple</type> | ||
<help>Set the interface to listen on.</help> | ||
<help>Set the interface(s) to display stats for.</help> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Open to suggestions on this but I think the previous text was misleading, There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If this is true it might be better to flip the default to the new behaviour. wouldn’t that also mean querying stats works using “dev1+dev2”? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure what you mean by 'new behaviour' - do you mean the separation of interface stats? That seems a bad default change for people used to the current behaviour. Querying for dev1+dev2 does work (other than my problems due to a 'missing' interface earlier) but just provides the total, not separate stats per interface as I'm trying to achieve - perhaps I've misunderstood what you're asking though. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If this merely pertains to stats fetch and you can fetch all interfaces using your code… changing the default to separate interface stats for multi select is not a bad thing. People can flip back to the old behaviour of the summarized query? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I've changed the default now. |
||
</field> | ||
<field> | ||
<id>general.separate_stats</id> | ||
<label>Separate interface stats</label> | ||
<type>checkbox</type> | ||
<help>If checked, separate stats are shown for each configured interface. If unchecked, | ||
a single set of stats is shown containing the sum of traffic on all configured interfaces.</help> | ||
</field> | ||
</form> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately this is only correct for IPv4 or the easy interface cases. Ping me on Monday for how to gather complete stats across split IPv4/6 interface assignments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fichtner so, about this, what's a better way to do it? I checked the logic for how the
vnstat.conf
is generated and it seems to use similar logic to this, but using a macrowhere the macro is doing:
.. which is largely the same as I'm doing, I think? If my logic in this PR is wrong, is this config logic also wrong? (I find it odd that the config logic falls back to the input value for unknown interfaces, rather than just ignoring them? Or is that needed for.. reasons?)