Jump to content
dmacias

Speedtest.net for unRAID 6.1+

395 posts in this topic Last Reply

Recommended Posts

2018.11.17

Been working on a new version using a different script I compiled for unRAID

 

https://github.com/taganaka/SpeedTest

 

You can install this package using wget and installpkg from the command line


https://github.com/dmacias72/unRAID-speedtest/raw/master/packages/SpeedTest-1.14-x86_64-1.txz

 

Then run SpeedTest to test this script

 

 

Speedtest-cli for 6.1+

Based on repositories

https://github.com/sivel/speedtest-cli


This plugin interacts with the command line interface for testing internet bandwidth using speedtest.net. This is for those that don't have another hard wired computer to check bandwidth with. Be patient. It will take about 30 seconds to get the results.

 

1. Copy the plugin url:

 

https://raw.githubusercontent.com/dmacias72/unRAID-speedtest/master/plugin/speedtest.plg
 

2. Paste url into install plugin text input and click install

 

As of 2018.01.13 NerdPack plugin is required to install Python 2

https://raw.githubusercontent.com/dmacias72/unRAID-NerdPack/master/plugin/NerdPack.plg

 

Created a standalone version for a webserver. Will read speedtest.xml and display similar results to the plugin. May include testing in the future.

 

https://github.com/dmacias72/speedtest/archive/master.zip

 

Options

 

Settings/Speedtest

Enable Secure Connection:  Use HTTPS instead of HTTP when communicating with speedtest.net operated servers

Save Speed Values As:  Display values in bytes instead of bits. Does not affect the image generated

Create Results Image:  Generate and provide a URL to the speedtest.net share results image

Select Speedtest Server:  Specify a server ID to test against from a list of speedtest.net servers sorted by distance

 

Settings/Scheduler/Speedtest

Cron Jobs and Command line:  Schedule Speedtest cron jobs from Settings/Scheduler/Speedtest

You can also manually add /usr/sbin/speedtest-xml to a cron job or just run speedtest-xml from the command line. The results will be stored in /boot/config/plugins/speedtest/speedtest.xml and also shown on the results page.

 

Sort and Filter results: There's a filter section below the table header where the results can be filtered by date, host, ping, download and upload. Sort and Filter settings will be saved.

 

Tools/Speedtest

Tests and Results will be under Tools/Speedtest

 

From the speedtest-cli github:

"It is not a goal of this application to be a reliable latency reporting tool.

 

Latency reported by this tool should not be relied on as a value indicative of ICMP style latency. It is a relative value used for determining the lowest latency server for performing the actual speed test against.

 

There is the potential for this tool to report results inconsistent with Speedtest.net. There are several concepts to be aware of that factor into the potential inconsistency:

  1. Speedtest.net has migrated to using pure socket tests instead of HTTP based tests

  2. This application is written in Python

  3. Different versions of Python will execute certain parts of the code faster than others

  4. CPU and Memory capacity and speed will play a large part in inconsistency between Speedtest.net and even other machines on the same network"

 

Change Log:

###2018.02.11
- update tablesorter 2.29.5
- update speedtest 2.0
###2018.01.27
- add download button to results page
- add colors to ping, download, and upload based on thresholds
###2018.01.16
- tweak notification event and subject

###2018.01.15
- change wording to warning
- add more info for NerdPack
- fix logic for warning notifications
- add click to schedule tab to go back

###2018.01.14
- fix warning on default ping setting
- replace protocol for image based on protocol used
- add test button to settings page

###2018.01.13c
- update speedtest to version 1.0.7
- add notifications and alerts
- require NerdPack Python 2
- add notification of missing python

###2017.11.14

- convert download and upload speeds based on units in settings

###2017.10.03

- move cdnjs to local

###2017.10.01

- fix stickyheaders and update css for new themes

###2017.06.21

- update speedtest to version 1.0.6

- add support for new 6.4 themes

###2017.04.16

- fix: remove my dangling link

- fix: set server default to 0 to prevent null variable if saved before server list loads

###2017.04.11

- update python for 6.2, 6.3 and 6.4

- remove zpeter's speetest script due to end of development

- add sivel script to 1.0.3

###2017.02.13

- version bump

###2017.02.12a

- fix scheduler hourly setting

- fix scheduler tab calculation

###2017.01.30

- update python to 2.7.13

- add support link to readme

###2017.01.27

- more code for XSS and CSRF vulnerabilities

###2017.01.23

- remove local tablesorter

- move js depends to cdn

- add sivel version 1.0.2

- harden code for XSS and CSRF vulnerabilities

###2017.01.07

- update speedtest-cli scripts

- add support for speedtest-linux script

- fix deleting single result

###2016.11.04

- fix: python min

###2016.10.28

- update min/max version

###2016.10.15

- update speedtest-linux to 1.0.2-c

###2016.10.09a

- update for 6.3

###2016.09.16

- update python to 2.7.12

- update tablesorter to 2.27.6

###2016.06.19

- fix: scheduler not saving changes

###2016.06.10

- fix: make schedule variables unique, so other schedules aren't affected

###2016.06.08

- fix: getting no results because script version 0.3.1 missing timeout option

###2016.06.03

- add: selectable versions of speedtest-cli

- add: timeout option for those getting 0 values

- move and revise manual list to server side

###2016.05.22

- fix: units error when using bytes

- fix: increase chart size and remove horizontal title so date labels show correctly.

- add: extra speedtest scripts (speedtest-cli and speedtest-linux)

###2016.05.21

- fix: fix scheduler tab count if no mover settings

- fix: blank image not showing with empty table

###2016.05.20

- fix: workaround for dynamix plugin update api not refreshing after update (remove update message)

- fix: change chart sort order

- fix: streamline code

###2016.05.15

- fix: tabs not working due to image path

###2016.05.06

- add tabs for settings, scheduler and history

- add dynamix plugin update api

- add help info

###2016.03.14

- update package locations

###2016.03.12

- fix install python 2.7.11 for unRAID 6.2+

- fix install python 2.7.9 for unRAID 6.1

###2016.02.28

- fix: chart and table sync on changes

- fix: filters save

- fix: page refresh after manual test

- fix: various minor css and code

- add settings icon

- removed stacked charts

- add: persistent chart selection cookie

- tested working on clean install OSX 10.11 and Safari 9.0

- tested working on upgrade to OSX 10.11.3 and Safari 9.03

###2016.02.25

- fix: chart filter cookie

- fix: after deletion of row next image not shown

###2016.02.24

- add modified speedtest.py script

- remove obsolete dependencies from plugin install

- fix share image function hopefully for Safari

- add scheduler and history button to settings page

###2016.02.23

- update packages to NerdPack versions

###2016.02.21

- add save chart type to cookie

- add save chart data type cookie

- move row click to table column click

###2016.02.14

- fix: move delete all outside icon tag

- fix: no quotes on table row id

- add: animation to table row delete

- move: tablesorter to document ready

- add: function to save filters on page refresh

- add: charts: line, area, vertical, horizontal

- date format to fixed yyyy-mm-dd hh:mm day for sorting and charts

- update tablesorter

###2016.01.17

- remove symlink to speedtest-linux

###2016.01.16

- minor diplay changes

- add tablesorter as a separate package

###2016.01.15

- fix filter save

- add filter reset button

- add speedtest-linux command

###2016.01.12

- add checks for failed speedtest

###2016.01.02

- added tablesorter pager plugin

- fix tablesort css padding

- click on row to show share image

- save sort and filter settings

- added default cfg

###2015.12.29

- update tablesorter to v2.25.0 combined

- add tablesorter filters to table

- save speedtest host server

- add shadow box display when running speedtest

###2015.12.20a

- Added cron settings page

- Separated into proper webgui locations

- Speedtest settings under Settings

- Speedtest Cron Settings under Settings/Scheduler

- Speedtest App under Tools/Speedtest

###2015.12.20

- added speedtest-xml script to /usr/sbin/ for cron jobs

- added logging to speedtest.php for start and completion of the script

###2015.12.19

- changed icon thanks to hernandito

- convert to stand alone script for cron jobs

- rearrange setting page layout

- one click remove

###2015.12.11c

- update install and remove scripts

###2015.12.10

- update install and remove scripts

- changed plugin repo

- add date and time to table

- add switchbuttons

- update packages

###2015.10.19

- fix typos

###2015.10.18b

- update to python 2.7.9

###2015.10.18a

- fix typos

###2015.10.18

- update install script

###2015.10.17

- initial commit

Screenshot:

speedtest-screenshot1.jpg&key=2ed28dba4b17324c69a7ae6b4f3a64126d9b206ba6ff8061be0b53e835cb23d4

speedtest-screenshot2.jpg&key=af9225e156d22507f3d746a7957b0d51cd963fa7412c20f4fd8f7dd795cba5a2

speedtest-screenshot3.jpg&key=3fe1954e072244017b116973ce0e86055ead2254f39ed987a1cb0a49174df227

 

Edited by dmacias
  • Upvote 1

Share this post


Link to post

thanks. now I can retire my bare-bones speedtest_cli.py :)

 

PS> Looks like it uninstalls existing Python installs. Replaced my newer version with its own. Not sure if this will affect something else as I'm not sure what else uses it.

 

4757068918.png

Share this post


Link to post

thanks. now I can retire my bare-bones speedtest_cli.py :)

 

PS> Looks like it uninstalls existing Python installs. Replaced my newer version with its own. Not sure if this will affect something else as I'm not sure what else uses it.

 

4757068918.png

 

What version of pyhthon did you have and what plugin was it from?  I can add the newer version to the plugin.

 

Edit nevermind. I see the newer one in the nerd pack. I'll update.

Share this post


Link to post

thanks. now I can retire my bare-bones speedtest_cli.py :)

 

PS> Looks like it uninstalls existing Python installs. Replaced my newer version with its own. Not sure if this will affect something else as I'm not sure what else uses it.

 

4757068918.png

 

What version of pyhthon did you have and what plugin was it from?  I can add the newer version to the plugin.

 

Edit nevermind. I see the newer one in the nerd pack. I'll update.

 

Not sure. I think it said it was 4 minor versions ahead (.9 vs your .5?) Not sure what I have that uses it but nothing I have run across is broken.

Share this post


Link to post

thanks. now I can retire my bare-bones speedtest_cli.py :)

 

PS> Looks like it uninstalls existing Python installs. Replaced my newer version with its own. Not sure if this will affect something else as I'm not sure what else uses it.

 

4757068918.png

 

What version of pyhthon did you have and what plugin was it from?  I can add the newer version to the plugin.

 

Edit nevermind. I see the newer one in the nerd pack. I'll update.

 

Not sure. I think it said it was 4 minor versions ahead (.9 vs your .5?) Not sure what I have that uses it but nothing I have run across is broken.

 

I updated the plugin to include python 2.7.9 from the nerd pack plugin. Don't want to get into the old dueling dependencies from days past.

Share this post


Link to post

getting the following error:

 

plugin: installing: https://raw.githubusercontent.com/dmacias72/speedtest/master/speedtest.plg

plugin: downloading https://raw.githubusercontent.com/dmacias72/speedtest/master/speedtest.plg

plugin: downloading: https://raw.githubusercontent.com/dmacias72/speedtest/master/speedtest.plg ... done

 

Warning: simplexml_load_file(): I/O warning : failed to load external entity "/boot/config/plugins/speedtest.plg" in /usr/local/emhttp/plugins/dynamix.plugin.manager/scripts/plugin on line 193

plugin: xml parse error

 

Myk

 

Share this post


Link to post

When I try and manually get it - get the following:

 

root@Tower:/boot/config/plugins/speedtest# wget https://github.com/dmacias72/speedtest/archive/2015.10.18b.tar.gz                                                                                 

--2015-10-19 03:25:18--  https://github.com/dmacias72/speedtest/archive/2015.10.18b.tar.gz                                                                                                         

Resolving github.com (github.com)... 192.30.252.130                                                                                                                                               

Connecting to github.com (github.com)|192.30.252.130|:443... connected.                                                                                                                           

HTTP request sent, awaiting response... 302 Found                                                                                                                                                 

Location: https://codeload.github.com/dmacias72/speedtest/tar.gz/2015.10.18b [following]                                                                                                           

--2015-10-19 03:25:22--  https://codeload.github.com/dmacias72/speedtest/tar.gz/2015.10.18b                                                                                                       

Resolving codeload.github.com (codeload.github.com)... 192.30.252.147                                                                                                                             

Connecting to codeload.github.com (codeload.github.com)|192.30.252.147|:443... connected.                                                                                                         

HTTP request sent, awaiting response... 404 Not Found                                                                                                                                             

2015-10-19 03:25:26 ERROR 404: Not Found.   

 

Myk

                                                                                                                                                     

Share this post


Link to post

looks like there is no b release on your github

 

Myk

Thanks I forgot to click upload tags. Updated now. There's a b now and a 19.

 

Share this post


Link to post

is there anyway for it to also give you a speedtest link with the results rather then an img?

No. That's all that speedtest-cli will return. Ping, download, upload and a url to the results image.

Share this post


Link to post

After using this for a few days, I would say that the upload and download speeds are in the ballpark compared with speedtest.net running on a wired computer and running Chrome browser.

 

However the ping times are way longer.  I am on Comcast here and my pings are in the 30's  This utility reports pings over 90 ms and some over 100.  Other than this, looks like it works ok.

Share this post


Link to post

Hi - is there any chance that the date (and time) can been added to the results table for each test?  I'm guessing local server time.

Share this post


Link to post

Hi - is there any chance that the date (and time) can been added to the results table for each test?  I'm guessing local server time.

Date and Time was already saved in order to provide a unique name for each table row.  I updated the plugin to show it in the table based on your unRAID display preferences for date and time. Also updated packages and layout some.  You will have to refresh your browser or its cache.

Share this post


Link to post
I updated the plugin to show it in the table based on your unRAID display preferences for date and time.

Fantastic, thank you.  CTRL+F5 on the page, and it's all displaying fine.

Share this post


Link to post

Tried 2 times to install the plugin but it failed

plugin: installing: https://raw.githubusercontent.com/dmacias72/unRAID-plugins/master/plugins/speedtest.plg
plugin: downloading https://raw.githubusercontent.com/dmacias72/unRAID-plugins/master/plugins/speedtest.plg
plugin: downloading: https://raw.githubusercontent.com/dmacias72/unRAID-plugins/master/plugins/speedtest.plg ... done

+==============================================================================
| Skipping package python-2.7.9-x86_64-1 (already installed)
+==============================================================================


plugin: downloading: https://raw.githubusercontent.com/dmacias72/unRAID-plugins/master/source/packagespyOpenSSL-0.15.1-x86_64-1_slack.txz ... done
plugin: bad file MD5: /boot/packages//pyOpenSSL-0.15.1-x86_64-1_slack.txz

Share this post


Link to post

Tried 2 times to install the plugin but it failed

plugin: installing: https://raw.githubusercontent.com/dmacias72/unRAID-plugins/master/plugins/speedtest.plg
plugin: downloading https://raw.githubusercontent.com/dmacias72/unRAID-plugins/master/plugins/speedtest.plg
plugin: downloading: https://raw.githubusercontent.com/dmacias72/unRAID-plugins/master/plugins/speedtest.plg ... done

+==============================================================================
| Skipping package python-2.7.9-x86_64-1 (already installed)
+==============================================================================


plugin: downloading: https://raw.githubusercontent.com/dmacias72/unRAID-plugins/master/source/packagespyOpenSSL-0.15.1-x86_64-1_slack.txz ... done
plugin: bad file MD5: /boot/packages//pyOpenSSL-0.15.1-x86_64-1_slack.txz

Sorry about that. I thought I caught the error fast enough to not push a new version. I just went ahead and pushed a new version.

Share this post


Link to post

thanks tried it again and got an new error. im running a parity check so i dont know if that caused the issue.

plugin: installing: plugin: installing: https://raw.githubusercontent.com/dmacias72/unRAID-plugins/master/plugins/speedtest.plg plugin: downloading https://raw.githubusercontent.com/dmacias72/unRAID-plugins/master/plugins/speedtest.plg plugin: downloading: https://raw.githubusercontent.com/dmacias72/unRAID-plugins/master/plugins/speedtest.plg ... done ============================================================================== | Skipping package python-2.7.9-x86_64-1 (already installed) ============================================================================== plugin: downloading: https://raw.githubusercontent.com/dmacias72/unRAID-plugins/master/source/packagespyOpenSSL-0.15.1-x86_64-1_slack.txz ... done plugin: bad file MD5: /boot/packages//pyOpenSSL-0.15.1-x86_64-1_slack.txz

Warning: simplexml_load_file(): I/O warning : failed to load external entity "" in /usr/local/emhttp/plugins/dynamix.plugin.manager/scripts/plugin on line 193
plugin: xml parse error

Share this post


Link to post

thanks tried it again and got an new error. im running a parity check so i dont know if that caused the issue.

plugin: installing: plugin: installing: https://raw.githubusercontent.com/dmacias72/unRAID-plugins/master/plugins/speedtest.plg plugin: downloading https://raw.githubusercontent.com/dmacias72/unRAID-plugins/master/plugins/speedtest.plg plugin: downloading: https://raw.githubusercontent.com/dmacias72/unRAID-plugins/master/plugins/speedtest.plg ... done ============================================================================== | Skipping package python-2.7.9-x86_64-1 (already installed) ============================================================================== plugin: downloading: https://raw.githubusercontent.com/dmacias72/unRAID-plugins/master/source/packagespyOpenSSL-0.15.1-x86_64-1_slack.txz ... done plugin: bad file MD5: /boot/packages//pyOpenSSL-0.15.1-x86_64-1_slack.txz

Warning: simplexml_load_file(): I/O warning : failed to load external entity "" in /usr/local/emhttp/plugins/dynamix.plugin.manager/scripts/plugin on line 193
plugin: xml parse error

Usually means a bad plg file download or bad plg file url, Try removing the plugin then reinstall and make sure to use this url

 https://raw.githubusercontent.com/dmacias72/unRAID-plugins/master/plugins/speedtest.plg

Share this post


Link to post

hmm i clear it and tried

plugin: installing: https://raw.githubusercontent.com/dmacias72/unRAID-plugins/master/plugins/speedtest.plg
plugin: downloading https://raw.githubusercontent.com/dmacias72/unRAID-plugins/master/plugins/speedtest.plg
plugin: downloading: https://raw.githubusercontent.com/dmacias72/unRAID-plugins/master/plugins/speedtest.plg ... done

+==============================================================================
| Skipping package python-2.7.9-x86_64-1 (already installed)
+==============================================================================


plugin: downloading: https://raw.githubusercontent.com/dmacias72/unRAID-plugins/master/source/packagespyOpenSSL-0.15.1-x86_64-1_slack.txz ... done
plugin: bad file MD5: /boot/packages//pyOpenSSL-0.15.1-x86_64-1_slack.txz

 

I looked into /boot/packages/  for pyOpenSSL-0.15.1-x86_64-1_slack.tx but did not see it however i have this

pyopenssl-0.11-x86_64-1alien.tgz*

 

and in the plugins section i don't see the speedtest.plg, really odd

Share this post


Link to post

hmm i clear it and tried

plugin: installing: https://raw.githubusercontent.com/dmacias72/unRAID-plugins/master/plugins/speedtest.plg
plugin: downloading https://raw.githubusercontent.com/dmacias72/unRAID-plugins/master/plugins/speedtest.plg
plugin: downloading: https://raw.githubusercontent.com/dmacias72/unRAID-plugins/master/plugins/speedtest.plg ... done

+==============================================================================
| Skipping package python-2.7.9-x86_64-1 (already installed)
+==============================================================================


plugin: downloading: https://raw.githubusercontent.com/dmacias72/unRAID-plugins/master/source/packagespyOpenSSL-0.15.1-x86_64-1_slack.txz ... done
plugin: bad file MD5: /boot/packages//pyOpenSSL-0.15.1-x86_64-1_slack.txz

 

I looked into /boot/packages/  for pyOpenSSL-0.15.1-x86_64-1_slack.tx but did not see it however i have this

pyopenssl-0.11-x86_64-1alien.tgz*

 

and in the plugins section i don't see the speedtest.plg, really odd

Sorry. I'm moving everything to a new repo and changing install method. Had a few missing "/"s.  Should be good now.

Share this post


Link to post

Any chance of adding a cron option? Running it every x hours/days/weeks with no user interaction and the results added to the table.

 

I wouldn't mind repeating this on a schedule to monitor the average speeds from my ISP.

 

Just an idea!

 

Thanks

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now