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

Traffic Graph Peak Scaling

Problems Installing or Upgrading pfSense Software
5
12
5.1k
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.
  • T
    tim.mcmanus
    last edited by Jan 16, 2013, 7:24 AM

    I'm not sure if I am remembering this correctly, but I thought in previous releases (>=2.0.1) the traffic graphs scaled down if the traffic was lower during the displayed period.  For example, if I were downloading at 60Mb the graphs scale to a peak of 60Mb.  However, when that peak exits the time period on the graph, the graph would scale down to the 5Mb as a peak if I consumed a maximum of 5Mb during that period.  If I've described that correctly and that should be happening, it's not on my release.

    I am running this version:  2.0.3-PRERELEASE (amd64) built on Fri Dec 7 22:39:16 EST 2012 FreeBSD 8.1-RELEASE-p13

    If it is working as designed–graphs don't scale down from their peak utilization--I'll drink less during the week and hopefully these hallucinations will go away for a while.

    1 Reply Last reply Reply Quote 0
    • G
      GruensFroeschli
      last edited by Jan 16, 2013, 9:56 AM

      It still is able to.
      Click on the text "AutoScale (up)" and it will change to "AutoScale (follow)"

      (This is with 2.0.3-PRERELEASE (i386) built on Mon Jan 14 16:52:28 EST 2013)

      We do what we must, because we can.

      Asking questions the smart way: http://www.catb.org/esr/faqs/smart-questions.html

      1 Reply Last reply Reply Quote 0
      • T
        tim.mcmanus
        last edited by Jan 16, 2013, 2:48 PM

        Ah, thanks!  I can barely read the text on the graphs.

        Not sure how that changed in my installation.  Was it set to "follow" as a default in earlier versions?  I don't remember having to change it, but thanks for giving me a clue!

        1 Reply Last reply Reply Quote 0
        • H
          hackin8
          last edited by Jan 16, 2013, 3:02 PM

          In order to see more detail I end up changing it back and forwards - which works fine but is there no way to have it automatically up and down scale?

          TIA

          1 Reply Last reply Reply Quote 0
          • T
            tim.mcmanus
            last edited by Jan 22, 2013, 2:11 AM

            Is there a setting I can toggle so the graphs come up with a default to "follow"?  I've searched high and low in the webUI for it and couldn't find it.  I tried a grep search from root and that wasn't the brightest idea.

            1 Reply Last reply Reply Quote 0
            • H
              hackin8
              last edited by Jan 22, 2013, 6:26 PM

              I had the same issue - but wanting to change default units from "bits" to "bytes".

              After some searching - you need to edit a file.
              This is assuming your are using 2.0.1 - although I guess other versions are the same.
              As always - make a backup and don't try this unless you are happy to manually edit files :)

              In file:  graph.php

              You will need to change the start default setting:

              $scale_type="up";
              to
              $scale_type="follow";

              That will change the starting graphs to what you want - even though the wording will say "automatic (follow)".
              If you click the link twice it will correct itself.

              Alternatively, if you want to be complete, change the wording (later in the same file).
              This is not truly necessary but keeps it neat!

              Original:
                scale_type = (scale_type == 'up') ? '' : '';
                SVGDoc.getElementById('switch_scale').firstChild.data = 'AutoScale (' + scale_type + ')';

              Changed
                scale_type = (scale_type == 'follow') ? '' : '';
                SVGDoc.getElementById('switch_scale').firstChild.data = 'AutoScale (' + scale_type + ')';

              Hope this helps -

              1 Reply Last reply Reply Quote 0
              • T
                tim.mcmanus
                last edited by Jan 23, 2013, 12:24 AM

                Awesome and thank you for the suggestion.  Found the entry in /usr/local/www/graph.php.  There was a comment on the line indicating that it was default variable, so that helped too.

                All I had to do was change that line to this:

                
                $scale_type="follow";               //Autoscale default setup : "up" = only increase scale; "follow" = increase and decrease scale according to current graphed datas
                
                

                It's right at the top of the file, nice and easy to find.

                Thanks again for your help!

                1 Reply Last reply Reply Quote 0
                • H
                  hackin8
                  last edited by Jan 23, 2013, 12:39 AM

                  Glad to help.  As mentioned that one small change will do what you want and change the default starting option, but the text will be incorrect until you click it a couple of times - not really critical and makes no difference to the actual operation.

                  Slowly finding my way around pfS - an awesome program!!

                  1 Reply Last reply Reply Quote 0
                  • T
                    tim.mcmanus
                    last edited by Jan 23, 2013, 1:45 AM

                    I'm actually running the 2.0.3 PRERELEASE and the text looks just fine.  Only needed to make that one tiny change and everything is awesome.

                    1 Reply Last reply Reply Quote 0
                    • S
                      spYro
                      last edited by Mar 15, 2013, 8:01 AM

                      Hi :)
                      the last days i looked into the php-code from a few pfsense-sites and changed them a little bit.
                      So i also changed the graph, so it automaticalls shows the speed in KB/s as default and not kbit/s.
                      But i would be glad, if there would be any way to configure the graph like "oh ok. we know opt2 is a 16.000 DSL-Connection, so we set opt2_speed = 16.000. Then the graph's 100% are the 16.000. If opt2 is used by 50% of it's maximum bandwith, then the graph shows the red line in the middle, at 50%".
                      Did you get, what i mean?
                      If you look at the graphs normally and see "uh, the red line is almost at 100% of the graph" then this could mean 50 kb/s or 5.000 kb/s. You can't see, because the maximum of the graph changes due to the last known peak.

                      Is there any way to do this?
                      I could get into the thing and programm it myself into the pfsense, but that should be the solution, right? ;)

                      Any ideas?
                      Best wishes
                      spYro

                      1 Reply Last reply Reply Quote 0
                      • P
                        phil.davis
                        last edited by Mar 15, 2013, 8:27 AM

                        There is not a way to easily "guess" the bandwidth of an interface at present - many people will have a 100Mbps ethernet cable between their WAN port and frojnt-end modem device. The front end connection to the internet will usually be much slower than this (depending what their hardware does and what they have paid for from the ISP).
                        It would be easy enough to add an attribute to the Interface configuration page that lets you define the expected real throughput speed for the interface.
                        Then, if something was set in there, things like Traffic Graph could start scaling at that rate.
                        If things like this are done, then it would also be good to have a "Save" button on the Traffic Graph page so users can decide what graph settings they want as default.

                        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
                        • S
                          spYro
                          last edited by Mar 15, 2013, 9:23 AM

                          @phil.davis:

                          There is not a way to easily "guess" the bandwidth of an interface at present - many people will have a 100Mbps ethernet cable between their WAN port and frojnt-end modem device. The front end connection to the internet will usually be much slower than this (depending what their hardware does and what they have paid for from the ISP).
                          It would be easy enough to add an attribute to the Interface configuration page that lets you define the expected real throughput speed for the interface.
                          Then, if something was set in there, things like Traffic Graph could start scaling at that rate.
                          If things like this are done, then it would also be good to have a "Save" button on the Traffic Graph page so users can decide what graph settings they want as default.

                          Exactly.
                          I would enter, for example, that opt2 (or wan2) should be maximum with 16.000 kbit/s.
                          If the real Bandwith never reaches this limit, its totally ok. I just want to see, what percentage of the technical-maximum is reached at the moment.
                          For a LAN-Interface this would be 100 Mbit/s or 1 Gbit/s.
                          I may be ablt to code that into the pfsense-GUI, but for saving this setting to the pfsense-harddrive, i may neet to look into it more deeply. PHP is one thing, but the saving-functions and the config-db…. well, i would love to have this coded into pfsense by one of the pfsense-programmers themself. So i dont need to learn, what they already know and so everyone can have this option in the next update.
                          What about it, PFsense-team? :)

                          1 Reply Last reply Reply Quote 0
                          • First post
                            Last post
                          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.