Speedtest from linux cli

Speedtest® CLI

Internet connection measurement for developers

Speedtest CLI brings the trusted technology and global server network behind Speedtest to the command line. Built for software developers, system administrators and computer enthusiasts alike, Speedtest CLI is the first official Linux-native Speedtest application backed by Ookla®.

With Speedtest CLI, you can easily:

  • Measure internet connection performance metrics like download, upload, latency and packet loss natively without relying on a web browser
  • Test the internet connection of your Linux desktop, a remote server or even lower-powered devices such as the Raspberry Pi® with the Speedtest Server Network™
  • Set up automated scripts to collect connection performance data, including trends over time
  • Use Speedtest in your programs by wrapping it in the programming language of your choice
  • View test results via CSV, JSONL or JSON

Install Options

Download Speedtest CLI

Speedtest CLI is maintained by the Ookla team. For assistance, please direct all inquiries to support@ookla.com.

macOS

Installing via brew will ensure you are always running the most up-to-date version of Speedtest CLI. You should update brew as frequently as possible.

Windows

Available for x86_64 only.

Linux

Available for: i386, x86_64, arm32, arm32hf, and arm64.

FreeBSD

Available for x86_64 only.

Our mission at Ookla is to make the internet better and faster for everyone by providing data and insights on real-world internet performance and quality. With billions of tests and coverage scans worldwide, we meet you where you are with apps for the devices you use most.

Источник

How to Test Your Linux Internet Speed Using Speedtest CLI

We always need to check the speed of the Internet connection at home and office. What do we do about this? Go to websites like Speedtest.net and begin the test. It loads JavaScript in the web browser and then selects the best server based upon ping and outputs the result. It also uses a Flash player to produce graphical results.

What about a headless server, where isn’t any web-based browser and the main point is, most of the servers are headless. Another bottleneck of such web browser-based speed testing is that you can’t schedule the speed testing at regular intervals.

Here comes an application “Speedtest-cli” that removes such bottlenecks and lets you test the speed of Internet connection from the command line.

What is Speedtest-cli

The application is basically a script developed in the Python programming language. It measures Internet Bandwidth speed bidirectionally. It uses speedtest.net infrastructure to measure the speed. Speedtest-cli is able to list servers based upon physical distance, test against the specific servers, and gives you a URL to share the result of your internet speed test.

Читайте также:  No logon server available windows

To install the latest speedtest-cli tool in Linux systems, you must have Python 2.4-3.4 or a higher version installed on the system.

Install speedtest-cli in Linux

There are three ways to install the speedtest-cli tool. The first method involves the use of python-pip package while the second method is to download the Python script, make it executable and run it and the third method is to use the package manager. Here I will cover all ways…

On this page

Let’s get started…

Install speedtest-cli Using Python PIP

First, you need to install the python-pip package, then afterward you can install the speedtest-cli tool using the pip command as shown below.

Install PIP in Debian/Ubuntu/Mint
Install PIP in CentOS/RHEL
Install PIP in Fedora
Install PIP in openSUSE
Install PIP in Arch Linux

Once pip has been installed, you can install the speedtest-cli tool.

To upgrade speedtest-cli, at a later stage, use.

Install speedtest-cli Using Python Script

First, download the python script from Github using the wget command or curl command and make the script file executable.

Next, move the executable to /usr/bin folder, so that you don’t need to type the full path every time.

Install speedtest-cli Using Package Manager

You can also install speedtest-cli using your default package manager as shown.

Testing Linux Internet Connection Speed with speedtest-cli

1. To test the Download and Upload speed of your internet connection, run the speedtest-cli command without any argument as shown below.

Check Linux Download and Upload Speed

2. To check the speed result in bytes in place of bits.

Check Linux Internet Speed in Bytes

3. Share your bandwidth speed with your friends or family. You are provided with a link that can be used to download an image.

Share Linux Internet Speed Test Results

The following picture is a sample speed test result generated using the above command.

View Linux Internet Speed Test Results

4. Don’t need any additional information other than Ping, Download, and Upload?

Test Linux Internet Speed

5. List the speedtest.net server-based upon physical distance. The distance in km is mentioned.

List Speedtest Servers

6. The last stage generated a huge list of servers sorted on the basis of distance. How to get desired output? Say I only want to see the speedtest.net server located in Mumbai (India).

List Nearest Speedtest Servers

7. Test connection speed against a specific server. Use Server Id generated in example 5 and example 6 in above.

Test Linux Internet Speed Against Server

8. To check the version number and help of speedtest-cli a tool.

Speedtest Version and Help

Note: Latency reported by the tool is not its goal and one should not rely on it. The relative latency values output is responsible for the server selected to be tested against. CPU and Memory capacity will influence the result to a certain extent.

Conclusion

The tool is a must for system administrators and developers. A simple script that runs without any issue. I must say that the application is wonderful, lightweight, and do what it promises. I disliked Speedtest.net for the reason it was using flash, but speedtest-cli gave me a reason to love them.

speedtest_cli is a third-party application and should not be used to automatically record the bandwidth speed. Speedtest.net is used by millions of users and it is a good idea to Set Your Own Speedtest Mini Server.

Читайте также:  Сетевой принтер не печатает с mac os

That’s all for now, till then stay tuned and connected to Tecmint. Don’t forget to give your valuable feedback in the comments below. Like and share us and help us get spread.

If You Appreciate What We Do Here On TecMint, You Should Consider:

TecMint is the fastest growing and most trusted community site for any kind of Linux Articles, Guides and Books on the web. Millions of people visit TecMint! to search or browse the thousands of published articles available FREELY to all.

If you like what you are reading, please consider buying us a coffee ( or 2 ) as a token of appreciation.

We are thankful for your never ending support.

Источник

Проверка скорости интернета Linux

Скорость подключения к интернету — это очень важный параметр работы сети. При подключении к интернету в офисе или дома может понадобиться проверить скорость интернета linux. Обычно, для этого достаточно открыть какой-либо сайт и скачать файл. Но это не единственный способ.

Проверка скорости интернета Linux может быть выполнена с помощью специального сервиса — speedtest.net. Вы можете открыть сайт проекта в браузере, программа определит ближайший к вам сервер, а затем покажет скорость доступа к этому серверу. Для работы сервиса используется флеш-плеер. Но не это тема нашей статьи. Сегодня мы рассмотрим как узнать скорость сети linux через терминал.

Проверка скорости интернета через терминал

Конечно, вы могли бы скачать файл с помощью wget и таким образом узнать скорость интернета. Но тогда на скорость загрузки будет влиять не только пропускная способность вашей сети, но и скорость отдачи сервера. Поэтому лучше использовать сервис speedtest, это, возможно, даже из командной строки.

speedtest-cli — это скрипт, написанный на Python, который позволяет измерить скорость интернета linux в двух направлениях. Вы можете проверять скорость сети на определенном расстоянии или для конкретных серверов, а также делиться своим результатом в интернете.

Установка SpeedTest-cli

Утилита может быть установлена двумя способами. Или из репозитория пакетов Python, либо прямо с Github, мы рассмотрим оба способа. Начнем с более сложного.

Сначала обновите систему до самой последней версии:

sudo apt update

Установите скрипт установки пакетов python:

sudo apt install python-pip

Затем установите саму программу speedtest-cli с помощью pip:

sudo pip install speedtest-cli

Второй способ еще проще, сначала скачайте файл программы с GitHub и дайте ему права на выполнение:

wget -O speedtest-cli https://raw.github.com/sivel/speedtest-cli/master/speedtest_cli.py
$ chmod +x speedtest-cli

Вы можете скопировать скрипт в папку /bin или выполнять его прямо из этой папки.

Проверка скорости интернет

Чтобы проверить скорость интернет linux достаточно запустить скрипт без параметров:

Вы можете посмотреть результат проверки в байтах, а не в битах:

Если хотите поделиться результатом с друзьями, можно попросить программу создать изображение:

Для получения информации только о ping, скорости загрузки и отдачи:

Посмотреть список доступных серверов можно с помощью параметра —list:

Теперь вы можете определить скорость соединения с нужным сервером, для этого достаточно указать ид сервера:

speedtest-cli —server 5907

Чтобы вывести версию утилиты выполните:

А для просмотра всех возможных опций программы:

Выводы

Утилита speedtest-cli очень проста в использовании и в то же время может оказаться очень полезной. Во всяком случае теперь вы знаете как выполняется проверка скорости интернета linux. Если у вас остались вопросы, спрашивайте в комментариях!

Источник

Читайте также:  Частные мастера установка windows

Speedtest from linux cli

Command line interface for testing internet bandwidth using speedtest.net

speedtest-cli works with Python 2.4-3.7

Just download (Like the way it used to be)

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

Issues relating to inconsistencies will be closed as wontfix and without additional reason or context.

Источник

Проверка скорости интернет-соединения в терминале Linux

Когда речь идет о проверке скорости интернета на слух приходит популярный сайт speedtest.net от Okla. Но для того чтобы проверить скорость интернета не обязательно заходить на сайт. Сделать это можно с помощью командной строки. В этой статье я покажу как проверить скорость интернета в терминале Linux.

Не буду долго описывать ситуации когда необходимо проверить скорость интернет-соединения. Лучше сразу перейдем к делу.

Как проверить скорость интернета в терминале Linux

В этой инструкции речь пойдет о двух инструментах проверки скорости интернет-соединения. С помощью:

  1. fast от fast.com (netflix).
  2. speedtest-cli от speedtest.net.

Проверка скорости интернета в командной строке с помощью Fast

Fast — это простая утилита (без зависимостей, которая написана на Go) для проверки скорости загрузки интернет-соединения из терминала Linux. Инструмент работает на разных платформах: в Linux, * BSD, Mac и Windows.

Fast.com, выпущенный в мае 2016 года компанией Netflix, предназначен для простого и быстрого способа проверки скорость интернета. Сервис использует Open Connect CDN, глобально распределенную сеть серверов, которая используется для хранения и обслуживания контента Netflix.

Инструмент очень прост в использовании и не имеет никаких других дополнительных функций. После запуска из командной строки утилита проверит скорость загрузки через Интернет, отобразив результат, предоставленный fast.com.

Установка Fast

Скачать инструмент можно с официальной страницы репозитория GitHub.

Вы можете установить его в /usr/local/bin в любом дистрибутиве Linux, просто скачав ( fast_linux_amd64 на 64-битных системах) в свою домашнюю папку, затем открыв терминал и введя (для 64-битного бинарного файла):

Вы также можете установить Fast из магазина Snapcraft. Данный способ установки требует, чтобы Snapd был установлен в вашей системе Linux. По умолчанию он установлен в Ubuntu.

Теперь наберите fast в терминале, чтобы проверить скорость интернета:

Проверка скорости интернета в командной строке с помощью speedtest.net

Инструмент speedtest-cli написан на Python, он также позволяет проверить скорость вашего интернета в командной строке с помощью сервиса www.speedtest.net. Сервис проверяет скорость скачивания и выгрузки, а также пинг.

У инструмента есть множество опций, в том числе возможность указать сервер speedtest.net для проверки скорости интернета, отображение всех доступных серверов, отсортировав по расстоянию. Также имеется возможность генерировать и предоставлять URL-адрес изображения результата проверки на speedtest.net.

Установка speedtest-cli:

Для установки speedtest-cli в Debian, Ubuntu, Linux Mint и другие дистрибутивы Linux на основе Debian или Ubuntu:

Источник

Оцените статью