Python
 Computer >> コンピューター >  >> プログラミング >> Python

Linuxターミナルからブロードバンド速度をテストする方法


速度テストCLIコマンドラインをインストールするには、 Python ppiが必要です。 。次のコマンドを使用して、 Python ppiをインストールします 。

$ sudo apt-get install python-pip

サンプル出力は次のようになります–

Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
   libbs2b0 libopusfile0 libqmmp-misc libqmmpui0 libsidplayfp
   linux-headers-4.2.0-27 linux-headers-4.2.0-27-generic
   linux-image-4.2.0-27-generic linux-image-extra-4.2.0-27-generic
   linux-signed-image-4.2.0-27-generic php7.0-opcache
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
   python-chardet-whl python-colorama python-colorama-whl python-distlib
   python-distlib-whl python-html5lib python-html5lib-whl python-pip-whl
   python-requests-whl python-setuptools python-setuptools-whl python-six-whl
   python-urllib3-whl python-wheel
Suggested packages:
   python-genshi
Recommended packages:
   python-dev-all
The following NEW packages will be installed:
   python-chardet-whl python-colorama python-colorama-whl python-distlib
.............................................................................

speedtest-cliをインストールするには 、次のコマンドを使用します–

$ sudo pip install speedtest-cli

サンプル出力は次のようになります–

Downloading/unpacking speedtest-cli
   Downloading speedtest_cli-0.3.4-py2.py3-none-any.whl
Installing collected packages: speedtest-cli
Successfully installed speedtest-cli
Cleaning up...

Speedtest-cliを実行するには、次のコマンドを使用します–

$ speedtest-cli

サンプル出力は次のようになります–

Retrieving speedtest.net configuration...
Retrieving speedtest.net server list...
Testing from Beam Telecom (183.82.104.71)...
Selecting best server based on latency...
Hosted by ACT Fibernet (Hyderabad) [10.33 km]: 2.75 ms
Testing download speed........................................
Download: 23.32 Mbit/s
Testing upload speed..................................................
Upload: 14.30 Mbit/s

speedtest-cliに関する詳細情報を取得するには 、次のコマンドを使用します–

$ speedtest-cli --help

サンプル出力は次のようになります–

usage: speedtest-cli [-h] [--bytes] [--share] [--simple] [--list]
[--server SERVER] [--mini MINI] [--source SOURCE]
[--timeout TIMEOUT] [--secure] [--version]

Command line interface for testing internet bandwidth using speedtest.net.
--------------------------------------------------------------------------
https://github.com/sivel/speedtest-cli

optional arguments:
-h, --help          show this help message and exit
--bytes             Display values in bytes instead of bits. Does not affect the image generated by --share
--share             Generate and provide a URL to the speedtest.net share results image
--simple            Suppress verbose output, only show basic information
--list              Display a list of speedtest.net servers sorted by distance
--server            SERVER Specify a server ID to test against
--mini              MINI URL of the Speedtest Mini server
--source            SOURCE Source IP address to bind to
--timeout           TIMEOUT HTTP timeout in seconds. Default 10
--secure            Use HTTPS instead of HTTP when communicating with speedtest.net operated servers
--version           Show the version number and exit

おめでとう!これで、「Linuxターミナルからブロードバンド速度をテストする方法」がわかりました。これらのタイプのコマンドについては、次のLinuxの投稿で詳しく説明します。読み続けてください!


  1. Windows 10 PC を高速化する方法

    Windows 10 コンピューターを高速化する方法を探しているなら、あなたは正しい場所にいます。今日に至るまで、動作が遅く、新しい PC でも高速であると思われる Windows 10 コンピューターをいくつか見て、修正してきました。私の経験によると、システムのパフォーマンスに影響を与えるいくつかの理由により、Windows の動作が遅くなる場合があります。 Windows (すべてのバージョン) の動作が遅くなる最も一般的な理由は次のとおりです: マルウェア感染。 Windows の起動時に実行される大量のプログラム ページング ファイル (仮想メモリ) の設定が無効です。 破損

  2. ターミナルを使用して Mac から Anaconda をアンインストールする方法

    強力なマネージャーである Anaconda をインストールしていて、アンインストールしたい場合は、こちらをご覧ください。この投稿では、Anaconda を削除し、他の重要なファイルのためにスペースを解放する方法について説明します。 Anaconda のクリーン アンインストールを行うには、いくつかの方法を使用します。 それでは、これ以上遅れることなく始めましょう。 アナコンダとは? 巨大なヘビであるアナコンダについて聞いたことがあるでしょう。ここで話している Anaconda は、機械学習、データ サイエンス、科学計算、人工知能で構成されています。これらの予測分析はすべて、スクリプト言語