Closed ChrisWNY closed 3 years ago
May I know why are you still using python speedtest ?
I'm using the Official-CLI Speedtest which is installed and running on my Raspberry Pi 4b. I have "official CLI" chosen in settings.
I think you have python version also installed
try speedtest-cli -h
You have to uninstall it to get the official CLI working
I get this as the output - arguments still seem to have changed in the speedtest-CLI...
speedtest-cli -h usage: speedtest-cli [-h] [--no-download] [--no-upload] [--single] [--bytes] [--share] [--simple] [--csv] [--csv-delimiter CSV_DELIMITER] [--csv-header] [--json] [--list] [--server SERVER] [--exclude EXCLUDE] [--mini MINI] [--source SOURCE] [--timeout TIMEOUT] [--secure] [--no-pre-allocate] [--version]
https://github.com/sivel/speedtest-cli
optional arguments: -h, --help show this help message and exit --no-download Do not perform download test --no-upload Do not perform upload test --single Only use a single connection instead of multiple. This simulates a typical file transfer. --bytes Display values in bytes instead of bits. Does not affect the image generated by --share, nor output from --json or --csv --share Generate and provide a URL to the speedtest.net share results image, not displayed with --csv --simple Suppress verbose output, only show basic information --csv Suppress verbose output, only show basic information in CSV format. Speeds listed in bit/s and not affected by --bytes --csv-delimiter CSV_DELIMITER Single character delimiter to use in CSV output. Default "," --csv-header Print CSV headers --json Suppress verbose output, only show basic information in JSON format. Speeds listed in bit/s and not affected by --bytes --list Display a list of speedtest.net servers sorted by distance --server SERVER Specify a server ID to test against. Can be supplied multiple times --exclude EXCLUDE Exclude a server from selection. Can be supplied multiple times --mini MINI URL of the Speedtest Mini server --source SOURCE Source IP address to bind to --timeout TIMEOUT HTTP timeout in seconds. Default 10 --secure Use HTTPS instead of HTTP when communicating with speedtest.net operated servers --no-pre-allocate Do not pre allocate upload data. Pre allocation is enabled by default to improve upload performance. To support systems with insufficient memory, use this option to avoid a MemoryError --version Show the version number and exit
It's speedtest python version please uninstall it and try again . See any of the below work.
sudo pip3 uninstall speedtest-cli
OR
sudo pip uninstall speedtest-cli
OR
sudo apt-get remove speedtest-cli
Ok, it's uninstalled - how do I go about installing the non-python CLI? On the Speedtest-CLI github page, all the install directions seem to point toward installing the Python version. Thanks for helping out! After uninstalling, speedtest and speedtest-cli commands are now gone.
Check here : https://www.speedtest.net/apps/cli
So I've tried that one recently...I get an error stating that the distribution version is not supported when trying to install on Raspberry Pi...sends me into a loop because https://www.speedtest.net/apps/cli points to the install command that is failing below...
curl -s https://install.speedtest.net/app/cli/install.deb.sh | sudo bash This distribution version is not currently supported via package management, please use the direct download builds per architecture found at https://www.speedtest.net/apps/cli
Output of uname -a
Linux raspberrypi 5.10.17-v7l+ #1414 SMP Fri Apr 30 13:20:47 BST 2021 armv7l GNU/Linux
Try this
wget https://install.speedtest.net/app/cli/ookla-speedtest-1.0.0-armhf-linux.tgz
tar -xvzf ookla-speedtest-1.0.0-armhf-linux.tgz
chmod +x speedtest
sudo mv speedtest /usr/local/bin
I downloaded and installed the binary, thanks for the instructions!
Still getting this odd error when running speedtest-official.sh...
sudo "/var/www/html/admin/scripts/pi-hole/speedtest/speedtest-official.sh"
Testing with 15197
usage: speedtest [-h] [--no-download] [--no-upload] [--bytes] [--share]
[--simple] [--csv] [--csv-delimiter CSV_DELIMITER]
[--csv-header] [--json] [--list] [--server SERVER]
[--exclude EXCLUDE] [--mini MINI] [--source SOURCE]
[--timeout TIMEOUT] [--secure] [--no-pre-allocate]
[--version]
speedtest: error: unrecognized arguments: -s 15197 --accept-gdpr --accept-license -f json-pretty
2021-05-13 10:31:48 2021-05-13 10:31:48 0
Error: near ",": syntax error
Output of speedtest-h however looks good now (args line up with your script)...
speedtest -h Speedtest by Ookla is the official command line client for testing the speed and performance of your internet connection.
Version: speedtest 1.0.0.2
Usage: speedtest [
Valid output formats: human-readable (default), csv, tsv, json, jsonl, json-pretty
Machine readable formats (csv, tsv, json, jsonl, json-pretty) use bytes as the unit of measure with max precision
Valid units for [-u] flag: Decimal prefix, bits per second: bps, kbps, Mbps, Gbps Decimal prefix, bytes per second: B/s, kB/s, MB/s, GB/s Binary prefix, bits per second: kibps, Mibps, Gibps Binary prefix, bytes per second: kiB/s, MiB/s, GiB/s Auto-scaled prefix: auto-binary-bits, auto-binary-bytes, auto-decimal-bits, auto-decimal-bytes
I see why...the script points to /usr/bin/speedtest for the binaries, so I also moved a copy of the speedtest binaries to /usr/bin
Seems to work now...will see if the scheduler kicks off normally at 12pm EST. Thanks!
With the EOL of bintray it's looking like they're going to want us to migrate to their new version. I got the same error when attempting the curl command.
Hopefully they update their install script to include raspberry pi flavors of linux.
I'm curious, what would happen if you don't run the curl
command and only sudo apt install speedtest
New install instructions from https://www.speedtest.net/apps/cli#ubuntu
If migrating from prior bintray install instructions please first...
sudo rm /etc/apt/sources.list.d/speedtest.list
sudo apt-get update
sudo apt-get remove speedtest
Other non-official binaries will conflict with Speedtest CLI Example how to remove using apt-get
sudo apt-get remove speedtest-cli
curl -s https://install.speedtest.net/app/cli/install.deb.sh | sudo bash
sudo apt-get install speedtest
From my experience it installs the Python version of speedtest when trying to install through the package manager. Recent updates to the Raspberry Pi OS seem to have broken some things. The manual method definitely works though.
From my experience it installs the Python version of speedtest when trying to install through the package manager. Recent updates to the Raspberry Pi OS seem to have broken some things. The manual method definitely works though.
No, they won't install python version which is made my 3rd party
Please post the output of whereis speedtest
before and after the following commands
sudo pip3 uninstall speedtest-cli
sudo pip uninstall speedtest-cli
sudo apt-get remove speedtest-cli
whereis speedtest speedtest: /usr/bin/speedtest /usr/local/bin/speedtest /usr/share/man/man1/speedtest.1.gz
@ChrisWNY Is the schedukled test working now ?
Yes! Worked great. No issues now. Manual binary install of Speedtest did the job. Thanks again for helping out!
Closing since this one is resolved.
Since updating the Speedtest module, the scheduler no longer works.
When running the following command: sudo "/var/www/html/admin/scripts/pi-hole/speedtest/speedtest-official.sh"
The result is as follows (appears to be related to deprecated args being passed to speedtest):
usage: speedtest [-h] [--no-download] [--no-upload] [--bytes] [--share] [--simple] [--csv] [--csv-delimiter CSV_DELIMITER] [--csv-header] [--json] [--list] [--server SERVER] [--exclude EXCLUDE] [--mini MINI] [--source SOURCE] [--timeout TIMEOUT] [--secure] [--no-pre-allocate] [--version] speedtest: error: unrecognized arguments: -s 15197 --accept-gdpr --accept-license -f json-pretty 2021-05-13 00:24:55 2021-05-13 00:24:57 0
Error: near ",": syntax error
Running the "speedtest" command by itself within the command line works fine, so does "pihole -a -sn" - that is also working, and the speedtest graph is updated properly. The script speedtest-official.sh however appears to be broken. Looks like the arguments/parameters for the speedtest-cli module have completely changed (version 2.1.3).