Formatting traffic in Interface statistics widget
-
2.3-BETA (amd64)
built on Sat Feb 06 04:07:15 CST 2016
FreeBSD 10.3-BETA1Interface statistics widget shows traffic (in this case Bytes In) in GB even when traffic is above 1 TB.
Should this change to TB after 1,000 GB?
-
https://github.com/pfsense/pfsense/pull/2592
It is easy to do, it just needs checking as to what happens on a 32-bit system (both with and without this change) when it tries to work with such big integers - PHP should cast those into (float) anyway and then do the (float) comparisons and formatting. -
Great.
If there is no one with running 32 bits version and with possibility to check, I can create VM to do so.Edit: VM with i386 version is running with test (2 Gbit/sec from VM to VM) to get 1 TB data :D
-
2.3-BETA (i386)
built on Sat Feb 06 14:22:10 CST 2016
FreeBSD 10.3-BETA1Checked i386 version, see attachment. Seems like amd64.
How can I check patched version?
-
Make that change yourself to /etc/inc/util.inc is easy on a test system.
The file in the PR;
https://github.com/pfsense/pfsense/pull/2592/files
The file itself:
https://github.com/phil-davis/pfsense/blob/patch-1/src/etc/inc/util.inc
The raw (text) version of the file (which you can copy from and paste into Diag->Edit File):
https://raw.githubusercontent.com/phil-davis/pfsense/patch-1/src/etc/inc/util.inc
or however you like to do it… -
Clear. Patch applied, test is running. After test is complete, I will post results in this reply.
Update 1: Notice the negative numbers in de graph. This also happen before patch. Maybe due i386 version. Negative number seems related to up/down graph from ~3 Gbit -> 0 and back.
The traffic is from long running iPerf session. On client and server iPerf side the up/down behavior does not occur. Traffic is constant ~3Gbit/sec
-
Make that change yourself to /etc/inc/util.inc is easy on a test system.
The file in the PR;
https://github.com/pfsense/pfsense/pull/2592/files
The file itself:
https://github.com/phil-davis/pfsense/blob/patch-1/src/etc/inc/util.inc
The raw (text) version of the file (which you can copy from and paste into Diag->Edit File):
https://raw.githubusercontent.com/phil-davis/pfsense/patch-1/src/etc/inc/util.inc
or however you like to do it…Another way to patch pfSense for any pending pull request is to add .diff to the end of the pull request URL in a web browser, then use the System Patches package to create a patch using the resulting URL, Path Strip Count 2 (for 2.3 - 1 for 2.2 and earlier), Base Directory /. Fetch the patch, apply it and reboot pfSense.
In this case, https://github.com/pfsense/pfsense/pull/2592.diff becomes https://patch-diff.githubusercontent.com/raw/pfsense/pfsense/pull/2592.diff
-
2.3-BETA (i386)
built on Sun Feb 07 16:42:18 CST 2016
FreeBSD 10.3-BETA1Yes, it's working, see attachment.
-
I'm now wondering how long it will take for you reach petabytes(?)!
???
-
Approx: (1 PByte * 8 (bits) * 1024 (=Tb) * 1024 (=Gb) * 2 (=speed/sec)) / 60 (minutes) / 60 (hours) / 24 (days) = ~ 48,5 days
8) -
Merged, thanks Phil!
-
Generally numbers are formatted right. My 1 cent
-
2.3-BETA (amd64)
built on Fri Feb 12 03:56:01 CST 2016
FreeBSD 10.3-BETA1Updated my bare-metal production pfSense-box to above version, and did recheck (download session for 7,5 hours non-stop to reach 1 TiB ;D).
As can be seen in attachments in the end TiB is shown, but not before 1024 GiB. I suspect it has a relation with 1000 vs 1024 notation, but not sure if this is correct.
-
Yes, 1015 Gib is less than 1TiB. So is does GiB up to 1023.99, then would switch to TiB.
Same applies for 1023.99 MiB then 1 GiB …