Speedtest CLI. Run speedtest on pfSense box
-
@marco42 I don't use this version, my speedtest is: Speedtest by Ookla 1.0.0.2 (5ae238b) FreeBSD 12.3-STABLE amd64
-
@carbonejf Ok, that one I don't know, sorry.
-
@icewraithuk how you import the "urllib2" in the pfsense?
I don't search for install.
-
@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
-
@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.
-
@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'
-
@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/urllibIt'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.
-
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-cliThen 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.
-
@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
-
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