Skip to content

Option to Disable dynamic bps scale and set a static bps value on the Traffic Report page#10277

Closed
NGD-Skier wants to merge 1 commit intoopnsense:masterfrom
NGD-Skier:core-TrafficReport-Static-bps(issue-6527)
Closed

Option to Disable dynamic bps scale and set a static bps value on the Traffic Report page#10277
NGD-Skier wants to merge 1 commit intoopnsense:masterfrom
NGD-Skier:core-TrafficReport-Static-bps(issue-6527)

Conversation

@NGD-Skier
Copy link
Copy Markdown

The intent of this branch is to allow a user to set a static bps value on the Traffic Report page, so they can, for example, set the max upload and max download rates, and have the traffic graph just use that for scale, so at a glance, they can see a visual representation of how much of their available bandwidth they're using.

This changes the default behavior where the graph sometimes suggests that bandwidth is maxed out, even when very little bandwidth is being used, as the graph auto-scales its vertical axis down to much smaller values when bandwidth usage is low. This original behavior is retained when the "Auto Max In" and "Auto Max Out" check boxes are check, but when you uncheck them, you can specify both your max in/out scale (convenient for people with asymmetric connection speeds).

i.e. With the new, optional behavior, if you look and see that the graph is maxed out, then you know your bandwidth is being fully used, if the graph shows traffic at half the height of the graph, then half your bandwidth is being used, and if you're using minimal to no bandwidth, the graph will be near the bottom instead of auto-scaling and "zooming" in, making it look like your connection is experiencing high usage when its not.

The only files changed to enable this additional functionality is traffic.volt. Nothing else has been changed.

This is related to the discussion of issue #6527 found at #6527

Thanks to user AdSchellevis for suggesting where this change would be made.

Before submitting this PR, I fully updated my local OpnSense system to the latest version (as of today, May 8th, 2026), rebooted, and then tested the modified file to verify that both original functionality and updated functionality work correctly.

-Mike

Important notices

Before you submit a pull request, we ask you kindly to acknowledge the following:

If AI was used, please disclose:

  • Model used: GPT 5.5
  • Extent of AI involvement: Highly involved. I only reviewed the code changes via a file diff using Beyond Compare.

Describe the problem

The dynamic Y-axis in the "Reporting: Traffic" page makes utilization hard to judge at a glance, and this adds optional fixed max rates for In/Out, so at a glance you can tell roughly how much of your bandwidth capacity it being used (instead of seeing a graph that looks maxed out, but then looking at the auto-scaled Y axis and realizing the scale is 1Mb, and you're barely using any of your 100Mb connection's potential).


Describe the proposed solution

It changes the file "traffic.volt," to affect the preferred behavior mentioned above. The original behavior is retained when the "Auto Max In" and "Auto Max Out" checkboxes are checked.


Related issue

#6527

…e on the Traffic Report page, so they can, for example, set the max upload and max download rates, and have the traffic graph just use that for scale, so at a glance, they can see a visual representation of how much of their available bandwidth they're using.

This changes the default behavior where the graph sometimes suggests that bandwidth is maxed out, even when very little bandwidth is being used, as the graph auto-scales its vertical axis down to much smaller values when bandwidth usage is low.  This original behavior is retained when the "Auto Max In" and "Auto Max Out" check boxes are check, but when you uncheck them, you can specify both your max in/out scale (convenient for people with asymmetric connection speeds).

i.e. With the new, optional behavior, if you look and see that the graph is maxed out, then you know your bandwidth is being fully used, if the graph shows traffic at half the height of the graph, then half your bandwidth is being used, and if you're using minimal to no bandwidth, the graph will be near the bottom instead of auto-scaling and "zooming" in, making it look like your connection is experiencing high usage when its not.

The only files changed to enable this additional functionality is traffic.volt.  Nothing else has been changed.

This is related to the discussion of issue opnsense#6527 found at opnsense#6527

Thanks to user AdSchellevis for suggesting where this change would be made.

  -Mike
@NGD-Skier
Copy link
Copy Markdown
Author

Here's an example of what the Traffic Graph looks like with this update:

image

@NGD-Skier
Copy link
Copy Markdown
Author

And here an example of the original behavior (which is what you get when you check the Auto Max In/Out boxes), showing what I mean by the auto-scaling making it look like maybe you're hitting peak bandwidth, with a spike that rises near the top of the graph, but when you look at the scale on the left (Y Axis), you see you're only using ~2.5Mb IN of the 40Mb possible on this connection.

image

@NGD-Skier
Copy link
Copy Markdown
Author

... but when you are using the static values that represent your In/Out bandwidth capacities, you get a graph that instantly/visually shows you you're not using much bandwidth. In this picture, I've set the manual Max In/Out values, to roughly the max bandwidth on my connection, so when my bandwidth usage has spikes to only ~2.5Mbps, the graph represent that as low bandwidth usage (in contrast with the previous picture with 2.5Mbps spiking the graph near the top.

image

@NGD-Skier
Copy link
Copy Markdown
Author

And here's showing just the WAN interface during a Speed Test via SpeedTest.net:

image

I wasn't able to capture the entire speedtest, which start with download and then does upload, so I captured the screenshot from the start of the download test, through the end of the download test, and then just the start of the upload speedtest before the start of the download speedtest went off the screen.

I adjusted my Max In/Out, so I could see a little more of the spikes before the throttling of my ISP kicks in and bandwidth usage stabilizes.

@AdSchellevis
Copy link
Copy Markdown
Member

@NGD-Skier 6d94603 should do roughly what you are looking for, also explains a bit why I'm not a huge fan of AI generated code these days. There's one thing AI is very good in and that is collecting technical debt I'm afraid....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants