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.
    • P
      phil.davis
      last edited by

      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

        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

          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

            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

              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

                @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

                  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
                  • ExolonE
                    Exolon
                    last edited by

                    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

                      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

                        Merged, thanks Phil!

                        1 Reply Last reply Reply Quote 0
                        • Raul RamosR
                          Raul Ramos
                          last edited by

                          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

                            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

                              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
                              • First post
                                Last post
                              Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.