1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
Dismiss Notice

Welcome To SNBForums

SNBForums is a community for anyone who wants to learn about or discuss the latest in wireless routers, network storage and the ins and outs of building and maintaining a small network.

If you'd like to post a question, simply register and have at it!

While you're at it, please check out SmallNetBuilder for product reviews and our famous Router Charts, Ranker and plenty more!

spdMerlin - Automated speedtests with graphs

Discussion in 'Asuswrt-Merlin' started by Jack Yaz, Apr 3, 2019.

  1. Jack Yaz

    Jack Yaz Part of the Furniture

    Joined:
    Apr 20, 2017
    Messages:
    2,460
    v2.0.1
    Updated 2019-09-29

    This script uses a large amount of RAM/memory when the speedtest is running, and as such a swap file is required

    The speedtest is scheduled to run at 12 past and 42 past the hour, every hour, by default

    Regarding speeds not necessarily matching browser-based tests, please see https://github.com/sivel/speedtest-cli#inconsistency


    Run automated speedtests for your Internet on your router with graphs available on the Tools page of the WebUI.

    This script serves as a user-friendly installer for a personal project developed by @JGrana
    Permission received from @JGrana to publish this!

    spdMerlin is free to use under the GNU General Public License version 3 (GPL 3.0).

    spdMerlin uses speedtest-cli

    This project is hosted on GitHub

    Love the script and want to support future development? Any and all donations gratefully received! PayPal donation

    [​IMG]

    [​IMG]

    Supported Models
    Models
    All modes supported by Asuswrt-Merlin. Models confirmed to work are below:
    • RT-AC68U
    • RT-AC86U
    • RT-AC3100
    Firmware versions
    You must be running firmware no earlier than 384.XX Asuswrt-Merlin

    Installation
    Using your preferred SSH client/terminal, copy and paste the following command, then press Enter:
    Code:
    /usr/sbin/curl --retry 3 "https://raw.githubusercontent.com/jackyaz/spdMerlin/master/spdmerlin.sh" -o "/jffs/scripts/spdmerlin" && chmod 0755 /jffs/scripts/spdmerlin && /jffs/scripts/spdmerlin install
    
    Usage
    To launch the spdMerlin menu after installation, use:
    Code:
    spdmerlin
    If this does not work, you will need to use the full path:
    Code:
    /jffs/scripts/spdmerlin
    
    Updating
    Launch spdmerlin and select option u
     
    Last edited: Sep 29, 2019
  2. Jack Yaz

    Jack Yaz Part of the Furniture

    Joined:
    Apr 20, 2017
    Messages:
    2,460
    RESERVED
     
    Last edited: Jul 8, 2019
    SMS786, Billy Chaney and L&LD like this.
  3. L&LD

    L&LD Part of the Furniture

    Joined:
    Dec 9, 2013
    Messages:
    9,749
    You're teasing us! :D

    But the name already sounds great! 'spdMerlin'. :)
     
    Billy Chaney and Zastoff like this.
  4. Jack Yaz

    Jack Yaz Part of the Furniture

    Joined:
    Apr 20, 2017
    Messages:
    2,460
    For the eagle eyed, the code has been going up all day ;-)
     
    Zonkd, L&LD, vdemarco and 1 other person like this.
  5. skeal

    skeal Part of the Furniture

    Joined:
    Apr 30, 2016
    Messages:
    3,427
    Location:
    /etc
    Sorry SPD?
     
  6. ApexRon

    ApexRon Very Senior Member

    Joined:
    Jun 17, 2018
    Messages:
    502
    Location:
    Apex, NC
    SPD = spud?
     
  7. L&LD

    L&LD Part of the Furniture

    Joined:
    Dec 9, 2013
    Messages:
    9,749
    I am reading it as 'speedMerlin'. :D
     
  8. L&LD

    L&LD Part of the Furniture

    Joined:
    Dec 9, 2013
    Messages:
    9,749
  9. Jack Yaz

    Jack Yaz Part of the Furniture

    Joined:
    Apr 20, 2017
    Messages:
    2,460
    Yes - see first post (now updated)
     
    L&LD likes this.
  10. L&LD

    L&LD Part of the Furniture

    Joined:
    Dec 9, 2013
    Messages:
    9,749
    Looks like RT-AC68U is not supported. :(

    But the graphs look great in the GUI (not populated right now, of course)! :) :) :)

    Code:
    ASUSWRT-Merlin RT-AC68U 384.10-0 Sun Mar 24 21:35:16 UTC 2019
    [email protected]:/tmp/home/root# /usr/sbin/curl --retry 3 "https://raw.githubusercontent.com/jackyaz/spdMerlin/mas
    ter/spdmerlin.sh" -o "/jffs/scripts/spdmerlin" && chmod 0755 /jffs/scripts/spdmerlin && /jffs/scripts/spdmerlin install
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100 19527  100 19527    0     0  41109      0 --:--:-- --:--:-- --:--:-- 45201
    spdMerlin: Welcome to spdMerlin v1.0.0, a script by JackYaz
    
    spdMerlin: Checking your router meets the requirements for spdMerlin
    
    Installing python (2.7.15-5) to root...
    Downloading http://bin.entware.net/armv7sf-k2.6/python_2.7.15-5_armv7-2.6.ipk
    Installing python-base (2.7.15-5) to root...
    Downloading http://bin.entware.net/armv7sf-k2.6/python-base_2.7.15-5_armv7-2.6.ipk
    Installing libffi (3.2.1-3) to root...
    Downloading http://bin.entware.net/armv7sf-k2.6/libffi_3.2.1-3_armv7-2.6.ipk
    Installing libbz2 (1.0.6-5) to root...
    Downloading http://bin.entware.net/armv7sf-k2.6/libbz2_1.0.6-5_armv7-2.6.ipk
    Configuring python-base.
    Configuring libffi.
    Collected errors:
     * opkg_download: Failed to download http://bin.entware.net/armv7sf-k2.6/libbz2_1.0.6-5_armv7-2.6.ipk, wget returned 8.
     * opkg_install_pkg: Failed to download libbz2. Perhaps you need to run 'opkg update'?
     * opkg_install_cmd: Cannot install package python.
    Package rrdtool (1.2.30-3a) installed in root is up to date.
    spdMerlin: Starting speedtest now...
    
    Could not find platform dependent libraries <exec_prefix>
    Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
    Traceback (most recent call last):
      File "/jffs/scripts/spdcli.py", line 20, in <module>
        import csv
    ImportError: No module named csv
    spdMerlin: Finished speedtest
    
     
  11. Jack Yaz

    Jack Yaz Part of the Furniture

    Joined:
    Apr 20, 2017
    Messages:
    2,460
    Try opkg update?

    If not, this ipkg looks right: http://bin.entware.net/armv7sf-k2.6/libbz2_1.0.6-5a_armv7-2.6.ipk

    Code:
    curl -fsL --retry 3 "http://bin.entware.net/armv7sf-k2.6/libbz2_1.0.6-5a_armv7-2.6.ipk" -o /tmp/libbz.ipk
    opkg install /tmp/libbz.ipk
    
     
  12. L&LD

    L&LD Part of the Furniture

    Joined:
    Dec 9, 2013
    Messages:
    9,749
    I did try opkg update:
    Code:
    [email protected]:/tmp/home/root# opkg update
    Downloading http://bin.entware.net/armv7sf-k2.6/Packages.gz
    Updated list of available packages in /opt/var/opkg-lists/entware
    [email protected]:/tmp/home/root#
    I'm not quite sure what to do with the link you provided? I can't seem to see the page, no matter how many times I click it.
     
  13. Jack Yaz

    Jack Yaz Part of the Furniture

    Joined:
    Apr 20, 2017
    Messages:
    2,460
    See my edit, I added a code sample. Once done, try re-running spdMerlin's install routine

    EDIT: This appears to be an Entware repo problem with a mismatched dependency, rather than the script. Not sure what to do with that information though...

    EDIT2: https://github.com/Entware/Entware/issues/263
     
    L&LD likes this.
  14. L&LD

    L&LD Part of the Furniture

    Joined:
    Dec 9, 2013
    Messages:
    9,749
    Thanks, the ipkg worked to install that package, but now this is showing.

    Code:
    spdMerlin: Starting speedtest now...
    
    Could not find platform dependent libraries <exec_prefix>
    Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
    Traceback (most recent call last):
      File "/jffs/scripts/spdcli.py", line 20, in <module>
        import csv
    ImportError: No module named csv
    spdMerlin: Finished speedtest
    
    Press enter to continue...
    
     
  15. Jack Yaz

    Jack Yaz Part of the Furniture

    Joined:
    Apr 20, 2017
    Messages:
    2,460
    Did you re-run the install command for spdMerlin?
     
  16. L&LD

    L&LD Part of the Furniture

    Joined:
    Dec 9, 2013
    Messages:
    9,749
    Should I uninstall it first? I ran 'u' and 'uf'. :oops:

    I'll re-run the actual installer. Thank you!
     
  17. Jack Yaz

    Jack Yaz Part of the Furniture

    Joined:
    Apr 20, 2017
    Messages:
    2,460
    No don't uninstall as that'll wipe the package you just installed. Hopefully the installer will work

    (equally opkg install python)

    EDIT: If it doesn't, we get to start trying to find which packages got installed on HND/ARMv8 that don't get installed on ARMv7
     
    L&LD likes this.
  18. L&LD

    L&LD Part of the Furniture

    Joined:
    Dec 9, 2013
    Messages:
    9,749
    The only error seems to be an SSL certificate error now.

    Code:
    [email protected]:/tmp/home/root# /usr/sbin/curl --retry 3 "https://raw.githubusercontent.com/jackyaz/spdMerlin/mas
    ter/spdmerlin.sh" -o "/jffs/scripts/spdmerlin" && chmod 0755 /jffs/scripts/spdmerlin && /jffs/scripts/spdmerlin install
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100 19527  100 19527    0     0  89986      0 --:--:-- --:--:-- --:--:--  100k
    spdMerlin: Welcome to spdMerlin v1.0.0, a script by JackYaz
    
    spdMerlin: Checking your router meets the requirements for spdMerlin
    
    Installing python (2.7.15-5) to root...
    Downloading http://bin.entware.net/armv7sf-k2.6/python_2.7.15-5_armv7-2.6.ipk
    Installing libtirpc (1.1.4-1) to root...
    Downloading http://bin.entware.net/armv7sf-k2.6/libtirpc_1.1.4-1_armv7-2.6.ipk
    Installing python-light (2.7.15-5) to root...
    Downloading http://bin.entware.net/armv7sf-k2.6/python-light_2.7.15-5_armv7-2.6.ipk
    Installing python-ctypes (2.7.15-5) to root...
    Downloading http://bin.entware.net/armv7sf-k2.6/python-ctypes_2.7.15-5_armv7-2.6.ipk
    Installing python-pydoc (2.7.15-5) to root...
    Downloading http://bin.entware.net/armv7sf-k2.6/python-pydoc_2.7.15-5_armv7-2.6.ipk
    Installing python-multiprocessing (2.7.15-5) to root...
    Downloading http://bin.entware.net/armv7sf-k2.6/python-multiprocessing_2.7.15-5_armv7-2.6.ipk
    Installing python-codecs (2.7.15-5) to root...
    Downloading http://bin.entware.net/armv7sf-k2.6/python-codecs_2.7.15-5_armv7-2.6.ipk
    Installing libsqlite3 (3260000-3) to root...
    Downloading http://bin.entware.net/armv7sf-k2.6/libsqlite3_3260000-3_armv7-2.6.ipk
    Installing python-sqlite3 (2.7.15-5) to root...
    Downloading http://bin.entware.net/armv7sf-k2.6/python-sqlite3_2.7.15-5_armv7-2.6.ipk
    Installing python-logging (2.7.15-5) to root...
    Downloading http://bin.entware.net/armv7sf-k2.6/python-logging_2.7.15-5_armv7-2.6.ipk
    Installing libgdbm (1.11-1) to root...
    Downloading http://bin.entware.net/armv7sf-k2.6/libgdbm_1.11-1_armv7-2.6.ipk
    Installing python-gdbm (2.7.15-5) to root...
    Downloading http://bin.entware.net/armv7sf-k2.6/python-gdbm_2.7.15-5_armv7-2.6.ipk
    Installing python-email (2.7.15-5) to root...
    Downloading http://bin.entware.net/armv7sf-k2.6/python-email_2.7.15-5_armv7-2.6.ipk
    Installing python-distutils (2.7.15-5) to root...
    Downloading http://bin.entware.net/armv7sf-k2.6/python-distutils_2.7.15-5_armv7-2.6.ipk
    Installing libexpat (2.2.6-1) to root...
    Downloading http://bin.entware.net/armv7sf-k2.6/libexpat_2.2.6-1_armv7-2.6.ipk
    Installing python-xml (2.7.15-5) to root...
    Downloading http://bin.entware.net/armv7sf-k2.6/python-xml_2.7.15-5_armv7-2.6.ipk
    Installing python-compiler (2.7.15-5) to root...
    Downloading http://bin.entware.net/armv7sf-k2.6/python-compiler_2.7.15-5_armv7-2.6.ipk
    Installing libxml2 (2.9.9-1) to root...
    Downloading http://bin.entware.net/armv7sf-k2.6/libxml2_2.9.9-1_armv7-2.6.ipk
    Installing libdb47 (4.7.25.4.NC-5) to root...
    Downloading http://bin.entware.net/armv7sf-k2.6/libdb47_4.7.25.4.NC-5_armv7-2.6.ipk
    Installing python-db (2.7.15-5) to root...
    Downloading http://bin.entware.net/armv7sf-k2.6/python-db_2.7.15-5_armv7-2.6.ipk
    Installing python-openssl (2.7.15-5) to root...
    Downloading http://bin.entware.net/armv7sf-k2.6/python-openssl_2.7.15-5_armv7-2.6.ipk
    Installing python-decimal (2.7.15-5) to root...
    Downloading http://bin.entware.net/armv7sf-k2.6/python-decimal_2.7.15-5_armv7-2.6.ipk
    Installing python-unittest (2.7.15-5) to root...
    Downloading http://bin.entware.net/armv7sf-k2.6/python-unittest_2.7.15-5_armv7-2.6.ipk
    Installing libncursesw (6.1-3) to root...
    Downloading http://bin.entware.net/armv7sf-k2.6/libncursesw_6.1-3_armv7-2.6.ipk
    Installing libncurses (6.1-3) to root...
    Downloading http://bin.entware.net/armv7sf-k2.6/libncurses_6.1-3_armv7-2.6.ipk
    Installing python-ncurses (2.7.15-5) to root...
    Downloading http://bin.entware.net/armv7sf-k2.6/python-ncurses_2.7.15-5_armv7-2.6.ipk
    Configuring libtirpc.
    Configuring python-light.
    Configuring python-codecs.
    Configuring libxml2.
    Configuring libdb47.
    Configuring python-db.
    Configuring python-decimal.
    Configuring python-distutils.
    Configuring python-pydoc.
    Configuring python-ctypes.
    Configuring python-multiprocessing.
    Configuring libsqlite3.
    Configuring python-sqlite3.
    Configuring python-logging.
    Configuring libgdbm.
    Configuring python-gdbm.
    Configuring python-email.
    Configuring libexpat.
    Configuring python-xml.
    Configuring python-compiler.
    Configuring python-openssl.
    Configuring python-unittest.
    Configuring libncursesw.
    Configuring libncurses.
    Configuring python-ncurses.
    Configuring python.
    Package rrdtool (1.2.30-3a) installed in root is up to date.
    spdMerlin: Starting speedtest now...
    
    Cannot retrieve speedtest configuration
    ERROR: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:726)>
    spdMerlin: Finished speedtest
    
    [email protected]:/tmp/home/root#
    
     
  19. Jack Yaz

    Jack Yaz Part of the Furniture

    Joined:
    Apr 20, 2017
    Messages:
    2,460
    Looks like the --secure flag not playing nice. Not sure what'd cause that :/
     
  20. L&LD

    L&LD Part of the Furniture

    Joined:
    Dec 9, 2013
    Messages:
    9,749
    Would any of the other scripts be interfering? Like Stubby or Skynet? Maybe an AiProtection interaction as it is enabled too (sorry, just guessing)?