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

    Speedtest CLI. Run speedtest on pfSense box

    Scheduled Pinned Locked Moved pfSense Packages
    167 Posts 52 Posters 142.7k 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.
    • johnpozJ
      johnpoz LAYER 8 Global Moderator
      last edited by johnpoz

      @adamoutler said in Speedtest CLI. Run speedtest on pfSense box:

      Google WiFi access points run daily checks. They are intended to be routers

      No they are not.. Do you mean the router, the nodes are not routers...

      They have their own built in speed test, and just had my son run it on his - guess what, it doesn't show his full speed 500Mbps he is suppose to get from his isp..

      Is that isp, is that the google router test... Not sure - since he is just moving into the house.. And he has nothing that can actually test via wire gig.. So that will have to wait.

      Those tests you posted or horrible!! 346 one day and then 3.5 the next? What speed do you actually pay for?

      speeds from the speedtest.net are not actual

      WTF does have to do if run from router or client behind router... Point has been made - you guys have fun... If you want to run speedtest from where ever... have at it... Point has been made.. I just tied of seeing why is pfsense speedtest not showing full speed... Which as been asked for YEARS... And this is only going to bring more of those..

      You know how I know I am seeing full speed of what I pay for, I agree with you - speedtest nests can be misleading.. Is when I download files from my server in the NL.. .And see 60+ MBps which is my 500Mbps I pay for from isp..

      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

      A 1 Reply Last reply Reply Quote 0
      • A
        adamoutler @johnpoz
        last edited by

        @johnpoz point the finger where it belongs. Point it at the ISP. They aren't giving clients the actual results. They run their own servers and you should trust pFSense over an Speedtest.net which is paid for by ISPs.

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

          Dude has Zero to do with the ISP... What do you not get that a router with X cpu designed to route packets might not be able to do 500/1000 as a client?

          Have already show this multiiple times... Test to same freaking place ran on client shows full speed, test on pfsense does not will..

          I'm done - have fun...

          should trust pFSense over an Speedtest.net which is paid for by ISPs.

          You clearly have no clue to what is even being discussed here to be honest..

          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

          A 1 Reply Last reply Reply Quote 0
          • A
            adamoutler @johnpoz
            last edited by

            @johnpoz if it can't do 500mbps as a client, then how can it possibly act as a client AND a server for packet filtering, suricata, or plain routing? This doesn't make sense unless something was seriously wrong with the libraries.

            1 Reply Last reply Reply Quote 1
            • E
              Exilewolf
              last edited by Exilewolf

              Hi know this topic is old but I did not see any other updates elsewhere.

              @aln Thank you so much for the work that you have done with this! While there is allot of blustering from people on here with their personal options I think this is a handy tool.

              pfsence has many more features then just "routing" and the more information you have about network speeds from different points can be useful.

              Personally I like this tool because I have a pfsence box that can handle the workload without issue. It is useful to me to see what speed my edge device is getting to the outside world. (without the fuss of going though the other hops in my internal network) It also helps me keep track of my crappy ISP.

              That being said If you ever wanted to make an update.. I would love to see something that gave a history of over period of time that would allow you to see to trends etc.

              Just an idea, not sure if anyone else would like this etc. But once again thank you!

              EDIT : kind of like what @provels has done but without using a 3rd party etc.

              provelsP 1 Reply Last reply Reply Quote 2
              • provelsP
                provels @Exilewolf
                last edited by provels

                @Exilewolf
                It was a fun exercise, but the results are so variable that I don't think the data is really worth the bits it's printed on. The big dip to the right was easily recognized without the data. It was a local outage. FWIW, this data was gathered from a server behind the FW and not just the FW. I have a 300/20 line.
                efed525d-27d7-4a4d-a8fc-314f3a9ce71e-image.png

                Peder

                MAIN - pfSense+ 24.11-RELEASE - Adlink MXE-5401, i7, 16 GB RAM, 64 GB SSD. 500 GB HDD for SyslogNG
                BACKUP - pfSense+ 23.01-RELEASE - Hyper-V Virtual Machine, Gen 1, 2 v-CPUs, 3 GB RAM, 8GB VHDX (Dynamic)

                1 Reply Last reply Reply Quote 1
                • chpalmerC
                  chpalmer
                  last edited by

                  This post is deleted!
                  1 Reply Last reply Reply Quote 0
                  • A
                    andresmorago @aln
                    last edited by

                    @aln thanks so much for this. can you please clarify how can i bind an specific interface when running a test from your widget?

                    A 1 Reply Last reply Reply Quote 0
                    • I
                      ipfftw
                      last edited by

                      Haha.. this is a hilariously classic pfsense forums discussion. I love the ones where the supposedly knowledgeable "mod" tells people that they are "holding it wrong" because they cant conceive of people actually using their product how they want.

                      I too want to do a speedtest from the router. And yes gasp, i use old desktops that get upgraded as routers. And i have ever since my first 486 firewall in 1996, with dubble /netbsd that came on two floppies. What the hell else are you going to do with old desktops? stick em in a 2U server case and rack em up.

                      The reason i personally want to speed test from the firewall is that the level 1 techs at the ISP always want you to connect your own computer directly to the modem. I dont want to rewire my network and do that, so the next best device to run this sort of test on is the firewall itself. And its a good test to see if the problem is on the lan or wan side too.

                      I took my sons old computer, a i5-2400 and slapped that in to replace my q6600 core2 quad. And pfsense took it no problem and booted right up after i remapped one interface whoes name changed.
                      If I wanted an appliance, i would have got a mikrotik. But i prefer running on consumer hardware at home so that if something breaks its easy enough to find some parts in the parts bin to fix it. The only reason i really upgraded was because the core 2 quad mobo only had a 100mb interface and now i have a gig. Which was necessary for this speed upgrade here. I am trying to get 700/20 up that i am paying for now.

                      And i have used plenty of firewalls with large pricetags that pfsense runs circles around in terms of ease of use and setup. Running on consumer hardware isn't a flaw in the product, its one of its main strengths.

                      I installed the widget with the oneline command (thank you muchly), and find it about the same as speedtest/fast.com. I always prefer speedof.me as that cannot be faked. But it almost always skews quite a bit lower on most connections for some reason. On really nice connections i get what is advertised with the speedof.me test but rarely on home or small biz connections. Maybe last mile lag affects that test more.

                      Anyways got what i needed and it was a fun ride. The widget works and i am grateful for that. The pfsense community delivers once again!

                      `

                      A 1 Reply Last reply Reply Quote 2
                      • A
                        aln @andresmorago
                        last edited by

                        @andresmorago you will need to modify the widget and add the --source parameter to the cli command. Look it up in the speedtest-cli docs.

                        1 Reply Last reply Reply Quote 1
                        • A
                          aln @ipfftw
                          last edited by

                          @ipfftw I'm glad to hear you are using the widget šŸ‘

                          1 Reply Last reply Reply Quote 0
                          • provelsP
                            provels
                            last edited by

                            Wonder if anyone's seeing this. When I run speedtest cli from my Windows box to pull the list of servers,

                            C:\Python27\python.exe C:\Python27\Lib\site-packages\speedtest.py --list > serverlist.txt
                            

                            normally it returns a list including a half dozen that are within 30 miles or so of my location. My scheduled task is hard-coded to the server that returns the best ping (the server that is normally chosen when I run speedtest without choosing a specific server). Recently, though, the closest servers are over 700km away and the nearby servers are missing.

                            Retrieving speedtest.net configuration...
                            12733) WestPAnet, Inc. (Warren, PA, United States) [758.42 km]
                             9276) ColoCrossing (Buffalo, NY, United States) [775.56 km]
                            31483) CreeperHost LTD (Buffalo, NY, United States) [775.56 km]
                            32993) Crowsnest Broadband LLC (Altoona, PA, United States) [849.74 km]
                            14233) Frontier (Rochester, NY, United States) [879.94 km]
                            14148) Rochester Institute of Technology (Rochester, NY, United States) [879.94 km]
                             1239) Synoptek (Rochester, NY, United States) [879.94 km]
                            39474) University of Rochester (Rochester, NY, United States) [879.94 km]
                            

                            And needless to say, my data is borked. Strange, when Irun the Windows client Ookla speedtest, it finds the servers w/o issue.
                            Anyone else see this?
                            3992a581-890a-461b-81a5-d051f5fcb40f-image.png

                            Peder

                            MAIN - pfSense+ 24.11-RELEASE - Adlink MXE-5401, i7, 16 GB RAM, 64 GB SSD. 500 GB HDD for SyslogNG
                            BACKUP - pfSense+ 23.01-RELEASE - Hyper-V Virtual Machine, Gen 1, 2 v-CPUs, 3 GB RAM, 8GB VHDX (Dynamic)

                            1 Reply Last reply Reply Quote 0
                            • A
                              alpharulez @provels
                              last edited by

                              @provels said in Speedtest CLI. Run speedtest on pfSense box:

                              @lastb0isct said in Speedtest CLI. Run speedtest on pfSense box:

                              Does anyone have the speedtest.py still? I can't seem to find it.

                              It comes with the package when you install it. SSH to your box and run:

                              pkg search speedtest
                              
                              [2.4.4-RELEASE][root@fw.workgroup]/root: pkg search speedtest
                              py37-speedtest-cli-2.1.1       Command line interface for testing internet bandwidth
                              
                              

                              Then run

                              pkg install py37-speedtest-cli-2.1.1
                              

                              Have fun!

                              Anyone seeing this error? I get this when i run any pkg command in this thread. Am on pfsense 2.4.5 on a 3100. Thanks

                              Shared object "libarchive.so.7" not found, required by "pkg"

                              A 1 Reply Last reply Reply Quote 0
                              • D
                                daplumber
                                last edited by

                                The binary package from Ookla is so much better than speedtest-cli which is ancient. But: no-source, deal I Guess.

                                See: https://www.speedtest.net/apps/cli
                                and:https://bintray.com/ookla/download/download_file?file_path=ookla-speedtest-1.0.0-freebsd.pkg

                                Obviously being a binary it's x86_64 only.

                                I don't suppose anyone's wrapping a page, or better widget, around speedtest? The above one already can output json.

                                –--------
                                This user has been carbon dated to the 8-bit era...

                                A 1 Reply Last reply Reply Quote 0
                                • A
                                  aln @daplumber
                                  last edited by

                                  @daplumber look for my widget on this topic's history

                                  D 1 Reply Last reply Reply Quote 0
                                  • D
                                    daplumber @aln
                                    last edited by

                                    @aln I was hoping fir a widget based on the Ookla binary above. It really is that much more accurate. Yes, I’m running an 8-core AMD with 8GB desktop as a router. Waste not, want not. Good for Suricata too.

                                    –--------
                                    This user has been carbon dated to the 8-bit era...

                                    1 Reply Last reply Reply Quote 0
                                    • A
                                      alpharulez @alpharulez
                                      last edited by

                                      @alpharulez said in Speedtest CLI. Run speedtest on pfSense box:

                                      @provels said in Speedtest CLI. Run speedtest on pfSense box:

                                      @lastb0isct said in Speedtest CLI. Run speedtest on pfSense box:

                                      Does anyone have the speedtest.py still? I can't seem to find it.

                                      It comes with the package when you install it. SSH to your box and run:

                                      pkg search speedtest
                                      

                                      Then run

                                      pkg install py37-speedtest-cli-2.1.1
                                      

                                      Have fun!

                                      Anyone seeing this error? I get this when i run any pkg command in this thread. Am on pfsense 2.4.5 on a 3100. Thanks

                                      Shared object "libarchive.so.7" not found, required by "pkg"

                                      For anyone facing this issue with pkg... here is what I did to resolve...

                                      pkg update

                                      this will fail

                                      Instead run:
                                      pkg-static update

                                      then run:
                                      pkg bootstrap -f

                                      then install:
                                      pkg update
                                      pkg install -y py37-speedtest-cli

                                      directories for reference if you would like to install the widget php file:
                                      /usr/local/bin/speedtest

                                      create new file with nano, copy paste code from the Github link @aln provided.
                                      /usr/local/www/widgets/widgets/speedtest.widget.php

                                      Should be good to go when you go back into the web portal and add widget (+). dont forget to save...

                                      D 1 Reply Last reply Reply Quote 0
                                      • D
                                        daplumber @alpharulez
                                        last edited by

                                        @alpharulez I had no issue installing the py37 speedtest. But the Ookla binary is so much better on the command line, I deinstalled the py37 version.

                                        A widget fir the binary would be nice to have, but I’m not fussed about it.

                                        –--------
                                        This user has been carbon dated to the 8-bit era...

                                        A 1 Reply Last reply Reply Quote 0
                                        • A
                                          alpharulez @daplumber
                                          last edited by

                                          @daplumber Cool. I had 'pkg' issues on the box. So the above steps fixed it.

                                          So what was the difference between the py37 and ookla builds?

                                          My understanding was Ookla did not have an ARM version of the build so might be an issue with my 3100.

                                          D 1 Reply Last reply Reply Quote 0
                                          • D
                                            daplumber @alpharulez
                                            last edited by

                                            @alpharulez the py37 build is Open Source, but also ancient, based on the code from when Speedtest was a Flash App! (read the Ookla site). The Ookla binary is closed, only compiled for FreeBSD 11.2, and thus pfSense 2.5.0 (right now). But the binary is based off their current code, is available for MacOS, Linux, and FreeBSD and comes with a plethora of output options, including a nifty text based interactive version. Think htop vs top functionality-wise.

                                            –--------
                                            This user has been carbon dated to the 8-bit era...

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