Facebook Twitter Instagram Pinterest YouTube
    Trending
    • Add Kodi to RetroPie Menu
    • Disable Auto-login in Raspberry Pi OS
    • Raspberry Pi Cloud Storage with MEGA
    • RetroPie Temperature Monitor from Menu
    • Pi Pico Pinout and Power Pins
    • Install Arduino IDE on Raspberry Pi
    • Raspberry Pi 400 SSD Upgrade
    • Raspberry Pi Temperature Monitoring
    Facebook Twitter Instagram Pinterest YouTube RSS
    Raspberry Pi SpyRaspberry Pi Spy
    • Home
    • Categories
      • General
      • Hardware
      • Programming
      • Python
      • Software
      • Tutorials & Help
    • BerryClip
      • BerryClip Instructions
      • BerryClip Plus Instructions
      • Videos & Reviews
    • Buy
      • Buy Pi
      • Buy Pi Accessories
      • Buy Books
    • Tools
      • Ultimate Raspberry Pi Alexa Skill
      • Pi Power Estimator App
      • Pi-Lite 14×9 LED Matrix Sprite Editor
      • RPiREF Pin-out Reference App
      • Simple Ohm’s Law Calculator
      • Web Sites & Links
    • Tutorials & Help
        Featured
        November 9, 20200

        Raspberry Pi Temperature Monitoring

        Recent
        May 6, 2022

        Add Kodi to RetroPie Menu

        February 26, 2022

        Disable Auto-login in Raspberry Pi OS

        February 2, 2022

        Raspberry Pi Cloud Storage with MEGA

      1. Contact Us
      2. Site Map
      Raspberry Pi SpyRaspberry Pi Spy
      You are at:Home»Python»Internet Speed Measurement Using Speedtest-cli
      Measure Raspberry Pi Internet Speed

      Internet Speed Measurement Using Speedtest-cli

      6
      By Matt on March 24, 2015 Python, Tutorials & Help

      SpeedTest.net is an excellent website that lets you measure internet speed from your Raspberry Pi. It’s useful for checking the performance either for fault finding purposes or to see if you are getting the service promised by your ISP.

      Matt Martz has created a Python project called speedtest-cli which allows you to do a basic upload/download measurement using SpeedNet’s infrastructure. It works fine on the Pi and is really easy to try out on the command line.

      Installation

      Downloading the utility is easy if you clone the projects git repository :

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

      Running SpeedTest with Python

      To run SpeedTest on the command line you need to navigate to the directory :

      cd speedtest-cli

      and then run the Python script using Python 3 :

      python3 speedtest.py

      The script will run and you should see something like this :

      Measure Internet Speed with speedtest-cli

      Share Internet Speed Results

      If you add –share to the command like this :

      python speedtest_cli.py --share

      it will create a link to an online image showing your results which you can share with your friends/family/enemies.

      speedtest-cli with share option

      Here’s my result using WiFi on a Pi 3 :

      and with Ethernet :

      The improved Ethernet bandwidth of the Pi 3 B+ gives a massive difference over previous models.

      Installing using Apt

      It is possible to install SpeedTest using Apt. This makes it slightly easier to run from the terminal but it may not be the latest version.

      You can install using:

      sudo update
      sudo apt install speedtest-cli

      Once installed you can run it using:

      speedtest

      The share option can be used as shown above for the Python version:

      speedtest --share

      Browser-based Internet Speed Measurement

      If you haven’t ever visited SpeedTest.net give it a try on your PC, Mac or laptop. Be sure to hit the oval “Begin Test” button in the centre of the page map rather than other buttons which may be adverts.

      Share. Facebook Twitter Pinterest LinkedIn Tumblr Email
      Previous ArticleRyanteck Debug Clip Add-on For Raspberry Pi
      Next Article Piper – The Minecraft Toolbox For Raspberry Pi

      Related Posts

      Add Kodi to RetroPie Menu

      Disable Auto-login in Raspberry Pi OS

      Raspberry Pi Cloud Storage with MEGA

      6 Comments

      1. Jeet on December 8, 2015 12:52 pm

        How did you manage to get 85mbps on the PI?! i have Virgin 152mbps and the max i get is 15mbp through the speed test on the pi but on my laptop get over a 100+

        Reply
        • Matt on December 8, 2015 8:07 pm

          Are you using Ethernet?

          Reply
      2. Sam on December 13, 2015 4:33 am

        Me too I’m on ethernet on a 100mbps DSL connection and a best I get is 40 mbps. I get 96mbps on my phone over wifi…

        Reply
      3. Hristo on February 3, 2016 1:25 pm

        I am getting 75 mbps on my pi and this is the exact speed of my internet connection

        Reply
      4. warlokje on December 4, 2018 5:52 pm

        when I did the setup it worked for months, but suddenly it stopped working .I get an error that says something like there is no server to test or the code can’t locate a server to test. too bad, because it was a really nice project. I don’t know if speedtest blocked the connection. maybe.

        Reply
        • Matt on December 4, 2018 7:13 pm

          I’ve just updated this blog. Delete your speedtest-cli directory and re-download. The main script has changed name to “speedtest.py” but I’ve just tried it on a Pi 3 and worked OK in both Python 2 and Python 3.

          Reply

      Leave A Reply Cancel Reply

      This site uses Akismet to reduce spam. Learn how your comment data is processed.

      Recent Posts
      May 6, 2022

      Add Kodi to RetroPie Menu

      February 26, 2022

      Disable Auto-login in Raspberry Pi OS

      February 2, 2022

      Raspberry Pi Cloud Storage with MEGA

      January 7, 2022

      RetroPie Temperature Monitor from Menu

      January 24, 2021

      Pi Pico Pinout and Power Pins

      Categories
      • 1-wire
      • 3D Printing
      • Add-ons
      • BBC Micro:bit
      • BerryClip
      • Books
      • Camera Module
      • Cases
      • Events
      • General
      • Hardware
      • I2C
      • Infographics
      • Interfaces
      • Minecraft
      • Model A+
      • Model B+
      • News
      • Pi Models
      • Pi Zero
      • Power
      • Programming
      • Python
      • Raspberry Pi OS
      • Raspbian
      • RetroGaming
      • Robotics
      • Sensors
      • Software
      • SPI
      • Tutorials & Help
      Tags
      3D Printing Arduino audio battery berryclip Birthday bluetooth cambridge camera CamJam DigiMakers display games GPIO I2C interface Kickstarter LCD LED Linux media Minecraft Model A Model B motionEyeOS PCB photography photos Pi-Lite portable power python Raspberry Jam Raspberry Pi Bootcamp raspbian Retrogaming retroPie screen SD card security sensor SPI temperature ultrasonic video
      Raspberry PI Related
      • Adafruit Blog
      • Average Maker
      • Official RaspBerry Pi Site
      • Raspberry Pi Pod
      • RasPi.tv
      • RaspTut
      • Stuff About Code
      Tech Resources
      • MattsBits – Pi Resources
      • Microbit Spy
      • Technology Spy
      Archives
      About

      Unofficial site devoted to the Raspberry Pi credit card sized computer offering tutorials, guides, resources,scripts and downloads. We hope to help everyone get the most out of their Pi by providing clear, simple articles on configuring, programming and operating it.

      Popular Posts
      September 19, 2014

      Top 5 Reasons The Raspberry Pi Sucks

      July 27, 2012

      16×2 LCD Module Control Using Python

      October 20, 2013

      Analogue Sensors On The Raspberry Pi Using An MCP3008

      Recent Posts
      May 6, 2022

      Add Kodi to RetroPie Menu

      February 26, 2022

      Disable Auto-login in Raspberry Pi OS

      February 2, 2022

      Raspberry Pi Cloud Storage with MEGA

      Facebook Twitter Instagram Pinterest YouTube RSS

      Entries RSS | Comments RSS

      This site is not associated with the official Raspberrypi.org site or the Raspberry Pi Foundation. Raspberry Pi is a trademark of the Raspberry Pi Foundation.

      Copyright © 2022 - All Rights Reserved - Matt Hawkins

      Type above and press Enter to search. Press Esc to cancel.