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

    Speed Test Panel Under Pfsense 2.7.0 Free BSD14

    Scheduled Pinned Locked Moved General pfSense Questions
    16 Posts 4 Posters 6.8k 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.
    • UnoptanioU
      Unoptanio
      last edited by Unoptanio

      Re: Speed Test and/or Graph

      159a8851-f107-42e2-b6f9-5179f8941054-image.png

      How do I install the speed test panel like this?
      a52b8eaf-7ba7-4b12-a6ed-bcf11ebf701d-image.png

      pfSensePlus24.03 2U BareMetal Asrock Industrial IMB-X1314MicroATX
      CPU: i7-13700@5.2GHz, RAM:32GB ECC, n°2 Samsung 870EVO SATA 2.5” SSD 1TB (ZFS) Raid1
      n°3 Intel i225-LM 2500/1000/100Mbps, n°1 NIC Intel i350-T4V2 10/100/1000 Mbps 4*GLAN, n°1 Intel X520-DA2

      johnpozJ 1 Reply Last reply Reply Quote 0
      • johnpozJ
        johnpoz LAYER 8 Global Moderator @Unoptanio
        last edited by

        @Unoptanio the thread you replied too has the info for the widget, which is here

        https://github.com/aln-1/pfsense-speedtest-widget

        Not sure if works with current versions of pfsense..

        An intelligent man is sometimes forced to be drunk to spend time with his fools
        If you get confused: Listen to the Music Play
        Please don't Chat/PM me for help, unless mod related
        SG-4860 24.11 | Lab VMs 2.8, 24.11

        UnoptanioU 1 Reply Last reply Reply Quote 0
        • UnoptanioU
          Unoptanio @johnpoz
          last edited by Unoptanio

          @johnpoz

          3741a3e9-6ec3-4978-b582-ffa301f4182c-image.png

          Shell Output - pkg install -y py311-speedtest-cli-2.1.3

          Updating pfSense-core repository catalogue...
          pfSense-core repository is up to date.
          Updating pfSense repository catalogue...
          pfSense repository is up to date.
          All repositories are up to date.
          The following 1 package(s) will be affected (of 0 checked):

          New packages to be INSTALLED:
          py311-speedtest-cli: 2.1.3 [pfSense]

          Number of packages to be installed: 1

          52 KiB to be downloaded.
          [1/1] Fetching py311-speedtest-cli-2.1.3.pkg: ....... done
          Checking integrity... done (0 conflicting)
          [1/1] Installing py311-speedtest-cli-2.1.3...
          [1/1] Extracting py311-speedtest-cli-2.1.3: .......... done

          It looks like it's been updated.

          Now what do you have to do to make the panel appear?

          pfSensePlus24.03 2U BareMetal Asrock Industrial IMB-X1314MicroATX
          CPU: i7-13700@5.2GHz, RAM:32GB ECC, n°2 Samsung 870EVO SATA 2.5” SSD 1TB (ZFS) Raid1
          n°3 Intel i225-LM 2500/1000/100Mbps, n°1 NIC Intel i350-T4V2 10/100/1000 Mbps 4*GLAN, n°1 Intel X520-DA2

          johnpozJ 1 Reply Last reply Reply Quote 0
          • johnpozJ
            johnpoz LAYER 8 Global Moderator @Unoptanio
            last edited by

            @Unoptanio install the widget code that is linked too..

            Just checked it working on 23.09

            widget.jpg

            An intelligent man is sometimes forced to be drunk to spend time with his fools
            If you get confused: Listen to the Music Play
            Please don't Chat/PM me for help, unless mod related
            SG-4860 24.11 | Lab VMs 2.8, 24.11

            UnoptanioU 1 Reply Last reply Reply Quote 0
            • UnoptanioU
              Unoptanio @johnpoz
              last edited by

              @johnpoz

              On 2.7.0 CE, how do I add the panel after installation?

              pfSensePlus24.03 2U BareMetal Asrock Industrial IMB-X1314MicroATX
              CPU: i7-13700@5.2GHz, RAM:32GB ECC, n°2 Samsung 870EVO SATA 2.5” SSD 1TB (ZFS) Raid1
              n°3 Intel i225-LM 2500/1000/100Mbps, n°1 NIC Intel i350-T4V2 10/100/1000 Mbps 4*GLAN, n°1 Intel X520-DA2

              johnpozJ bmeeksB 2 Replies Last reply Reply Quote 0
              • johnpozJ
                johnpoz LAYER 8 Global Moderator @Unoptanio
                last edited by

                @Unoptanio per the instruction given in the link.. Copy that code and past into a file

                btw - if your on 2.7 3.11 ?? Pretty sure it should be like

                py39-speedtest-cli-2.1.3

                An intelligent man is sometimes forced to be drunk to spend time with his fools
                If you get confused: Listen to the Music Play
                Please don't Chat/PM me for help, unless mod related
                SG-4860 24.11 | Lab VMs 2.8, 24.11

                UnoptanioU 1 Reply Last reply Reply Quote 0
                • bmeeksB
                  bmeeks @Unoptanio
                  last edited by bmeeks

                  @Unoptanio said in Speed Test Panel Under Pfsense 2.7.0 Free BSB14:

                  @johnpoz

                  On 2.7.0 CE, how do I add the panel after installation?

                  Possibly you did not complete all the installation steps. Did you do this:

                  Copy the widget file speedtest.widget.php to /usr/local/www/widgets/widgets/ on your pfSense machine.

                  You will find that file at the GitHub link: https://github.com/aln-1/pfsense-speedtest-widget. The widget requires two different things: (1) install the Python speedtest CLI client binary; and (2) copy down the PHP source code file for the dashboard widget itself.

                  Once the widget PHP source file is copied to the correct spot on your firewall, you can click the Widgets icon on the pfSense home page to add that widget to your home screen.

                  1 Reply Last reply Reply Quote 1
                  • UnoptanioU
                    Unoptanio @johnpoz
                    last edited by Unoptanio

                    @johnpoz

                    8f7af4e1-6e9e-4190-bce8-0d0cc9880aac-image.png

                    he wrote it into the tmp folder.
                    How do I copy it to the folder /usr/local/www/widgets/widgets/?

                    pfSensePlus24.03 2U BareMetal Asrock Industrial IMB-X1314MicroATX
                    CPU: i7-13700@5.2GHz, RAM:32GB ECC, n°2 Samsung 870EVO SATA 2.5” SSD 1TB (ZFS) Raid1
                    n°3 Intel i225-LM 2500/1000/100Mbps, n°1 NIC Intel i350-T4V2 10/100/1000 Mbps 4*GLAN, n°1 Intel X520-DA2

                    johnpozJ bmeeksB 2 Replies Last reply Reply Quote 0
                    • johnpozJ
                      johnpoz LAYER 8 Global Moderator @Unoptanio
                      last edited by johnpoz

                      @Unoptanio the simple solution here is just ssh to your pfsense, use your fav editor.. I use nano - open that file name where you want it and paste in the code from github..

                      Just fired up 2.7

                      [2.7.0-RELEASE][admin@test.mydomain.tld]/root: pkg search speedtest
                      py311-speedtest-cli-2.1.3      Command line interface for testing internet bandwidth
                      [2.7.0-RELEASE][admin@test.mydomain.tld]/root: 
                      

                      odd that not using py39.. But looks like py311 is the one for 2.7, but just copy your widget code and you should be good.

                      An intelligent man is sometimes forced to be drunk to spend time with his fools
                      If you get confused: Listen to the Music Play
                      Please don't Chat/PM me for help, unless mod related
                      SG-4860 24.11 | Lab VMs 2.8, 24.11

                      UnoptanioU 2 Replies Last reply Reply Quote 1
                      • bmeeksB
                        bmeeks @Unoptanio
                        last edited by bmeeks

                        @Unoptanio said in Speed Test Panel Under Pfsense 2.7.0 Free BSB14:

                        How do I copy it to the folder /usr/local/www/widgets/widgets/?

                        How about the good old copy command , cp, like so:

                        cp /tmp/speedtest.widget.php /usr/local/www/widgets/widgets/speedtest.widget.php

                        You can run that command at an actual shell prompt on the firewall, or from the DIAGNOSTICS > COMMAND PROMPT menu in the pfSense GUI.

                        1 Reply Last reply Reply Quote 2
                        • UnoptanioU
                          Unoptanio @johnpoz
                          last edited by Unoptanio

                          @johnpoz

                          Ok!!

                          2bb7f06b-b286-42bb-a9ee-e233f622c895-image.png

                          f560de61-b878-4d10-a4ff-78880a2f2c52-image.png

                          7fe30140-6213-465d-b3c1-d0adc021bb47-image.png

                          returns values ​​a little lower than the Ookla test
                          https://www.speedtest.net/it

                          bd60526f-90bd-42f7-9224-e6c0ee635f4c-image.png

                          pfSensePlus24.03 2U BareMetal Asrock Industrial IMB-X1314MicroATX
                          CPU: i7-13700@5.2GHz, RAM:32GB ECC, n°2 Samsung 870EVO SATA 2.5” SSD 1TB (ZFS) Raid1
                          n°3 Intel i225-LM 2500/1000/100Mbps, n°1 NIC Intel i350-T4V2 10/100/1000 Mbps 4*GLAN, n°1 Intel X520-DA2

                          johnpozJ Sergei_ShablovskyS 2 Replies Last reply Reply Quote 0
                          • johnpozJ
                            johnpoz LAYER 8 Global Moderator @Unoptanio
                            last edited by johnpoz

                            @Unoptanio as to your values - I have been saying for years - depending on your hardware (pfsense) which isn't meant as a client running speed tests directly on it or too it can show varying results..

                            While its fine for say a benchmark, he pfsense shows 100, and now its 50 - then something prob not right.. But when you route through pfsense you see your full say 200 speed.

                            If your going to run speedtest like this or iperf directly on pfsense - you need to understand that. The test of a firewall/router function for routing and firewalling - is through it, not to or from it..

                            I wouldn't put much stock in the values don't meet your expectations.. Test from a client through pfsense to see if your getting what you should be getting, etc.

                            An intelligent man is sometimes forced to be drunk to spend time with his fools
                            If you get confused: Listen to the Music Play
                            Please don't Chat/PM me for help, unless mod related
                            SG-4860 24.11 | Lab VMs 2.8, 24.11

                            Sergei_ShablovskyS 1 Reply Last reply Reply Quote 2
                            • UnoptanioU
                              Unoptanio @johnpoz
                              last edited by Unoptanio

                              @johnpoz

                              8279f7a9-1d0e-4cfe-b67a-0195b9cbe092-image.png

                              # pkg search speedtest
                              py311-speedtest-cli-2.1.3 Command line interface for testing internet bandwidth

                              # pkg install -y py311-speedtest-cli-2.1.3
                              Updating pfSense-core repository catalogue...
                              pfSense-core repository is up to date.
                              Updating pfSense repository catalogue...
                              pfSense repository is up to date.
                              All repositories are up to date.
                              The following 1 package(s) will be affected (of 0 checked):

                              New packages to be INSTALLED:
                              py311-speedtest-cli: 2.1.3 [pfSense]

                              Number of packages to be installed: 1

                              52 KiB to be downloaded.
                              [1/1] Fetching py311-speedtest-cli-2.1.3.pkg: ....... done
                              Checking integrity... done (0 conflicting)
                              [1/1] Installing py311-speedtest-cli-2.1.3...
                              [1/1] Extracting py311-speedtest-cli-2.1.3: .......... done

                              # speedtest-cli
                              Retrieving speedtest.net configuration...
                              Testing from Ampersand Srl (80.86.62.2)...
                              Retrieving speedtest.net server list...
                              Selecting best server based on ping...
                              Hosted by AntennADSL (Rome) [327.43 km]: 25.363 ms
                              Testing download speed................................................................................
                              Download: 636.53 Mbit/s
                              Testing upload speed......................................................................................................
                              Upload: 169.96 Mbit/s
                              Execute Shell Command

                              # speedtest --version
                              speedtest-cli 2.1.3
                              Python 3.11.3 (main, Jun 27 2023, 17:49:02) [Clang 15.0.7 (https://github.com/llvm/llvm-project.git llvmorg-15.0.7-0-g8dfdcc
                              Execute Shell Command

                              pfSensePlus24.03 2U BareMetal Asrock Industrial IMB-X1314MicroATX
                              CPU: i7-13700@5.2GHz, RAM:32GB ECC, n°2 Samsung 870EVO SATA 2.5” SSD 1TB (ZFS) Raid1
                              n°3 Intel i225-LM 2500/1000/100Mbps, n°1 NIC Intel i350-T4V2 10/100/1000 Mbps 4*GLAN, n°1 Intel X520-DA2

                              1 Reply Last reply Reply Quote 0
                              • bmeeksB
                                bmeeks
                                last edited by bmeeks

                                When the speedtest client is installed on pfSense, that makes your firewall one of the two endpoints for the test. So, when running the test, your firewall now has an entire extra set of new tasks to perform in addition to its normal job of receiving network packets, inspecting them against the firewall rules, and then routing them to their destination.

                                With the speedtest client running, the firewall now has to also generate the necessary speedtest packets to send to the other endpoint (to test upload speed, for example), then it has to keep up with all the packet counts and timing so it can compute and display the final stats. That's the kind of application programming work the firewall code is not optimized for. That means throughput will suffer because the firewall is "distracted" by the extra tasks required to execute the speedtest binary.

                                This is why folks are advised to put the speedtest client on some endpoint inside your network so that you test throughput "through pfSense" and not "to pfSense". pfSense is optimized to route traffic from interface A to interface B. It's not optimized as well for generating traffic and then sending it and measuring throughput.

                                1 Reply Last reply Reply Quote 4
                                • Sergei_ShablovskyS
                                  Sergei_Shablovsky @Unoptanio
                                  last edited by Sergei_Shablovsky

                                  @Unoptanio said in Speed Test Panel Under Pfsense 2.7.0 Free BSD14:

                                  @johnpoz

                                  returns values ​​a little lower than the Ookla test
                                  https://www.speedtest.net/it

                                  bd60526f-90bd-42f7-9224-e6c0ee635f4c-image.png

                                  Until now Mar 2024, for some unknown reasons: desktop and mobile Ookla’s app versions SHOW BETTER SPEED because CHOOSE GEOGRAPHICALLY NEAREST to You SERVER, algorithm make choice BETTER than CLI-version of app.

                                  Many users note this.

                                  —
                                  CLOSE SKY FOR UKRAINE https://youtu.be/_tU1i8VAdCo !
                                  Help Ukraine to resist, save civilians people’s lives !
                                  (Take an active part in public protests, push on Your country’s politics, congressmans, mass media, leaders of opinion.)

                                  1 Reply Last reply Reply Quote 0
                                  • Sergei_ShablovskyS
                                    Sergei_Shablovsky @johnpoz
                                    last edited by Sergei_Shablovsky

                                    @johnpoz said in Speed Test Panel Under Pfsense 2.7.0 Free BSD14:

                                    @Unoptanio as to your values - I have been saying for years - depending on your hardware (pfsense) which isn't meant as a client running speed tests directly on it or too it can show varying results..

                                    But this give understanding about whole ISP uplink bandwidth. (Of course this measurement must be doing WITHOUT any other “everyday normal work” net flow.
                                    Better to measure at 10-11am, and 4:30-5:30pm daytime and 7:30-10:00pm (when ISP appliances are maximum loaded) WITHOUT any other “normal work” net activity.

                                    While its fine for say a benchmark, he pfsense shows 100, and now its 50 - then something prob not right.. But when you route through pfsense you see your full say 200 speed.

                                    If your going to run speedtest like this or iperf directly on pfsense - you need to understand that. The test of a firewall/router function for routing and firewalling - is through it, not to or from it..

                                    You are right but 8 of 10 questions here on forum are ABOUT UPLINK BANDWIDTH!!! People not interested in “testing pfSense router”, but interested in “how fast my internet”.

                                    Look at this not from router developer position (I understand clearly, pfSense are like Your child), but FROM ORDINARY USERS PERSPECTIVE.

                                    Only 10-15% interested in measuring VPN connect, or how shaping/limiting working well. (And yes traffic generators and iperf3 are kings here).

                                    I wouldn't put much stock in the values don't meet your expectations.. Test from a client through pfsense to see if your getting what you should be getting, etc.

                                    —
                                    CLOSE SKY FOR UKRAINE https://youtu.be/_tU1i8VAdCo !
                                    Help Ukraine to resist, save civilians people’s lives !
                                    (Take an active part in public protests, push on Your country’s politics, congressmans, mass media, leaders of opinion.)

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