• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login
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 139.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.
  • C
    carbonejf @MarcO42
    last edited by Apr 26, 2023, 10:28 AM

    @marco42 I don't use this version, my speedtest is: Speedtest by Ookla 1.0.0.2 (5ae238b) FreeBSD 12.3-STABLE amd64

    M 1 Reply Last reply Apr 26, 2023, 11:35 AM Reply Quote 0
    • M
      MarcO42 @carbonejf
      last edited by Apr 26, 2023, 11:35 AM

      @carbonejf Ok, that one I don't know, sorry.

      1 Reply Last reply Reply Quote 0
      • P
        patrick.pesegodinski @icewraithuk
        last edited by Apr 27, 2023, 6:45 PM

        @icewraithuk how you import the "urllib2" in the pfsense?

        I don't search for install.

        G 1 Reply Last reply Apr 28, 2023, 11:31 AM Reply Quote 0
        • P
          patrick.pesegodinski
          last edited by Apr 27, 2023, 7:23 PM

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

          myAPI="<your api="" key="" goes="" here,="" in="" the="" quotes="">"
          baseURL = 'https://api.thingspeak.com/update?api_key=%s' % myAPI
          print baseURL</your>

          The command "your' doens't work

          P 1 Reply Last reply Apr 27, 2023, 9:37 PM Reply Quote 0
          • P
            provels @patrick.pesegodinski
            last edited by Apr 27, 2023, 9:37 PM

            @patrick-pesegodinski said in Speedtest CLI. Run speedtest on pfSense box:

            myAPI="<your api="" key="" goes="" here,="" in="" the="" quotes="">"

            myAPI="put_key_here"

            PS - That post was the only one that user ever made, and besides it was about 6 years ago.

            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)

            P 1 Reply Last reply Apr 28, 2023, 11:04 AM Reply Quote 0
            • P
              patrick.pesegodinski @provels
              last edited by Apr 28, 2023, 11:04 AM

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

              @patrick-pesegodinski said in Speedtest CLI. Run speedtest on pfSense box:

              myAPI="<your api="" key="" goes="" here,="" in="" the="" quotes="">"

              myAPI="put_key_here"

              PS - That post was the only one that user ever made, and besides it was about 6 years ago.

              I think the command for python 3.8 was changed. I connect with this command:

              import urllib.request

              baseURL = 'https://api.thingspeak.com/update?api_key=MY_KEY=0'

              1 Reply Last reply Reply Quote 0
              • G
                Gertjan @patrick.pesegodinski
                last edited by Apr 28, 2023, 11:31 AM

                @patrick-pesegodinski said in Speedtest CLI. Run speedtest on pfSense box:

                how you import the "urllib2" in the pfsense?

                Here :
                /usr/local/lib/python3.9/urllib
                /usr/local/lib/python3.11/urllib

                It's already there.
                If it isn't, mention your pfSense version.
                Then I'll tell you to upgrade ;)

                Install FreeBSD packages (not from Netgate) yourself on pfSense : that's not a good idea.

                No "help me" PM's please. Use the forum, the community will thank you.
                Edit : and where are the logs ??

                C 1 Reply Last reply Apr 28, 2023, 12:42 PM Reply Quote 0
                • C
                  chrcoluk @Gertjan
                  last edited by chrcoluk Apr 28, 2023, 12:46 PM Apr 28, 2023, 12:42 PM

                  For modern pfSense, I just did this. (new download link also)

                  fetch -o speedtest-cli https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py
                  chmod +x speedtest-cli

                  Then edit first line of speedtest-cli to the following.

                  #!/usr/bin/env python3.8
                  

                  Should run at this point, no need to install extra dependency packages.

                  As Jim said, it might be slower than from a fast client device as pfSense is optimised for routing.

                  I got about 600 down on the cli, but then immediately did a test on my PC which got 954mbit down (gigabit connection). But I think having this as an option to help diagnose issues can be useful hence I installed it.

                  pfSense CE 2.7.2

                  G 1 Reply Last reply Apr 28, 2023, 2:19 PM Reply Quote 0
                  • G
                    Gertjan @chrcoluk
                    last edited by Apr 28, 2023, 2:19 PM

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

                    For modern pfSense

                    Not for my 23.01 then, as it doesn't have python3.8

                    No "help me" PM's please. Use the forum, the community will thank you.
                    Edit : and where are the logs ??

                    1 Reply Last reply Reply Quote 0
                    • A
                      asulwer
                      last edited by Sep 19, 2024, 4:56 PM

                      with some minor changes this worked for me on version 24.03-release

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

                      use this command to install

                      pkg update ; pkg install -y py311-speedtest-cli && curl -o /usr/local/www/widgets/widgets/speedtest.widget.php https://raw.githubusercontent.com/aln-1/pfsense-speedtest-widget/master/speedtest.widget.php
                      
                      1 Reply Last reply Reply Quote 1
                      • First post
                        Last post
                      Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
                        This community forum collects and processes your personal information.
                        consent.not_received