Raspberry pi скорость интернета

How do I do an internet speedtest from CLI on Raspbian?

I am have a couple pi’s running headless raspbian that I SSH into, I wanted to know if there is any speedtest utility that I can use. I am aware that I can download a file and check the speed that way but I wanted comprehensive download/upload data kind of what speedtest.net provides but CLI version of it. Is that possible? Thanks for the help

3 Answers 3

There is a package on github that does a speedtest.net sampling from the commandline, it is located here: https://github.com/sivel/speedtest-cli. Note that the author points out several potential pitfalls:

  1. Speedtest.net has migrated to using pure socket tests instead of HTTP based tests
    1. This application is written in Python. Different versions of Python will execute certain parts of the code faster than others
    2. CPU and Memory capacity and speed will play a large part in inconsistency between Speedtest.net and even other machines on the same network

    Can you please explain how to use it. Like a sudo apt-get command, and how to execute it aswell? I apologize I am still a noob when it comes to linux been using it for 6 months on and off but decided to migrate everything to it because I love the learning experience.

    Have you read the instructions on the page I linked to? (github.com/sivel/speedtest-cli) They provide 3 different ways to install (using pip directly, using pip with the github repo, or installing it by pulling using wget . Then you just run speedtest-cli to execute the test (or look at the options using speedtest-cli -h ). Just make sure you have Python installed (Should be installed by default on the Pi if you use Raspbian)

    Источник

    How to measure internet speed using speedtest-cli on Raspberry Pi 4

    Nowadays, from the social life of man to the business life, everything is connected with the internet, because of which the speed of the internet has a great significance. To check the speed of the internet, we usually browse an internet speed test on the browser and connect to any server to find out the speed of our internet. We can complete this task of finding the speed of the internet without a browser by using a simple tool of the speedtest-cli on the Raspberry Pi operating system.

    The speedtest-cli is an application that is used to find the speed of the internet through the command line and in this guide, we will explore the methods to install and use the speedtest-cli. We will install the speedtest-cli on RaspberryPi using the methods:

    • By downloading the speedtest-cli package from its website
    • Through the pip
    • Through the Python script

    Method 1: How to install the speedtest-cli by downloading its package from its website

    The speedtest-cli is not usually come in the default repository of the Raspberry Pi operating system, so we will install its deb package from its official website using a command:

    In the above command, the “s” flag is used to specify the certificate file, once the package has been downloaded, we will install it using the command:

    Now, if we want to delete the package, we can use the purge command:

    Method 2: How to install the speedtest-cli through the pip

    We can also install the speedtest-cli application through the pip, but as we know the speedtest-cli is dependent on the python language, so first we will install the python packages using the command:

    After the successful installation of the python packages, we will install speedtest-cli using the pip3:

    To uninstall the speedtest-cli using the pip3, we will use the command:

    Method 3: How to install the speedtest-cli through Python script

    The other way to install the speedtest-cli on Raspberry Pi is by using the Python script of the speedtest.py, for this we will download its script from the githubusercontent.com using the wget command:

    $ wget -O speedtest-cli https: // raw.githubusercontent.com / sivel / speedtest-cli / master / speedtest.py

    Now, we will change the permissions of speedtest-cli:

    We will move the downloaded package of the speedtest-cli to the “/usr/bin/” directory using the command:

    We have moved the speedtest-cli to the “/usr/bin/” so that when we use the application to measure the speed of the internet, we are not supposed to direct its path.

    How to measure the speed of the internet using speedtest-cli on Raspberry Pi

    To measure the speed of the internet, launch the application of speedtest-cli using the command:

    In the above output, you can see the results in which the internet speed is shown of download as well as upload, similarly, if you want to display the output in bytes instead of bits unit, use the command:

    To share these results with anyone else, use the command:

    A link is displayed where the results of your internet has been shown, you can share this link to anyone with whom you want to share the results, if you open the URL, a image will be displayed as:

    Conclusion

    The internet speed can be measured using the application of the speedtest-cli on Raspberry Pi and this application is useful as it can measure the speed of the internet and we can also share the results of speedtest-cli by simply sharing the URL with other users. In this write-up, we have discussed different methods of installation of the speedtest-cli on Raspberry Pi and also discuss how to use it for measuring the internet speed.

    About the author

    Hammad Zahid

    I’m an Engineering graduate and my passion for IT has brought me to Linux. Now here I’m learning and sharing my knowledge with the world.

    Источник

    Читайте также:  Подключение интернета ноутбука через wifi windows
Оцените статью
Adblock
detector