• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login
Netgate Discussion Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login

Formatting traffic in Interface statistics widget

Scheduled Pinned Locked Moved 2.3-RC Snapshot Feedback and Issues - ARCHIVED
14 Posts 6 Posters 3.3k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M
    M_Devil
    last edited by Feb 7, 2016, 7:01 PM Feb 6, 2016, 6:29 PM

    2.3-BETA (amd64)
    built on Sat Feb 06 04:07:15 CST 2016
    FreeBSD 10.3-BETA1

    Interface 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?
    Stats.jpg
    Stats.jpg_thumb
    Stats2.jpg
    Stats2.jpg_thumb

    1 Reply Last reply Reply Quote 0
    • P
      phil.davis
      last edited by Feb 7, 2016, 4:00 PM

      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.

      As the Greek philosopher Isosceles used to say, "There are 3 sides to every triangle."
      If I helped you, then help someone else - buy someone a gift from the INF catalog http://secure.inf.org/gifts/usd/

      1 Reply Last reply Reply Quote 0
      • M
        M_Devil
        last edited by Feb 7, 2016, 8:30 PM Feb 7, 2016, 7:01 PM

        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

        1 Reply Last reply Reply Quote 0
        • M
          M_Devil
          last edited by Feb 8, 2016, 6:54 AM Feb 7, 2016, 10:28 PM

          2.3-BETA (i386)
          built on Sat Feb 06 14:22:10 CST 2016
          FreeBSD 10.3-BETA1

          Checked i386 version, see attachment. Seems like amd64.

          How can I check patched version?

          Stats_i386.jpg
          Stats_i386.jpg_thumb

          1 Reply Last reply Reply Quote 0
          • P
            phil.davis
            last edited by Feb 8, 2016, 10:21 AM

            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…

            As the Greek philosopher Isosceles used to say, "There are 3 sides to every triangle."
            If I helped you, then help someone else - buy someone a gift from the INF catalog http://secure.inf.org/gifts/usd/

            1 Reply Last reply Reply Quote 0
            • M
              M_Devil
              last edited by Feb 8, 2016, 10:58 AM Feb 8, 2016, 10:50 AM

              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

              Graph.jpg_thumb
              Graph.jpg

              1 Reply Last reply Reply Quote 0
              • D
                David_W
                last edited by Feb 8, 2016, 11:19 AM

                @phil.davis:

                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

                1 Reply Last reply Reply Quote 0
                • M
                  M_Devil
                  last edited by Feb 8, 2016, 12:10 PM

                  2.3-BETA (i386)
                  built on Sun Feb 07 16:42:18 CST 2016
                  FreeBSD 10.3-BETA1

                  Yes, it's working, see attachment.

                  GraphWithPatch.jpg
                  GraphWithPatch.jpg_thumb

                  1 Reply Last reply Reply Quote 0
                  • E
                    Exolon
                    last edited by Feb 8, 2016, 6:55 PM

                    I'm now wondering how long it will take for you reach petabytes(?)!

                    ???

                    1 Reply Last reply Reply Quote 0
                    • M
                      M_Devil
                      last edited by Feb 8, 2016, 9:41 PM

                      Approx: (1 PByte * 8 (bits) * 1024 (=Tb) * 1024 (=Gb) * 2 (=speed/sec)) / 60 (minutes) / 60 (hours) / 24 (days) = ~ 48,5 days
                      8)

                      1 Reply Last reply Reply Quote 0
                      • C
                        cmb
                        last edited by Feb 8, 2016, 10:48 PM

                        Merged, thanks Phil!

                        1 Reply Last reply Reply Quote 0
                        • R
                          Raul Ramos
                          last edited by Feb 8, 2016, 11:18 PM

                          Generally numbers are formatted right. My 1 cent

                          pfSense:
                          ASRock -> Wolfdale1333-D667 (2GB TeamElite Ram)
                          Marvell 88SA8040 Sata to CF(Sandisk 4GB) Controller
                          NIC's: RTL8100E (Internal ) and Intel® PRO/1000 PT Dual (Intel 82571GB)

                          1 Reply Last reply Reply Quote 0
                          • M
                            M_Devil
                            last edited by Feb 13, 2016, 1:19 PM

                            2.3-BETA (amd64)
                            built on Fri Feb 12 03:56:01 CST 2016
                            FreeBSD 10.3-BETA1

                            Updated 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.

                            IS1TBStillGB.jpg
                            IS1TBStillGB.jpg_thumb
                            IS1TiB.jpg
                            IS1TiB.jpg_thumb

                            1 Reply Last reply Reply Quote 0
                            • P
                              phil.davis
                              last edited by Feb 14, 2016, 2:51 AM

                              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 …

                              As the Greek philosopher Isosceles used to say, "There are 3 sides to every triangle."
                              If I helped you, then help someone else - buy someone a gift from the INF catalog http://secure.inf.org/gifts/usd/

                              1 Reply Last reply Reply Quote 0
                              14 out of 14
                              • First post
                                14/14
                                Last post
                              Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
                                This community forum collects and processes your personal information.
                                consent.not_received