700字范文,内容丰富有趣,生活中的好帮手!
700字范文 > speedtest命令行linux Linux或者Mac下命令行speedtest测试网络速度

speedtest命令行linux Linux或者Mac下命令行speedtest测试网络速度

时间:2023-02-10 14:55:38

相关推荐

speedtest命令行linux Linux或者Mac下命令行speedtest测试网络速度

我这里如下安装:

git clone /sivel/speedtest-cli.git

Python3 speedtest-cli/setup.py install【这个根据自己的版本来安装就可以了】

在speedtest-cli这个目录下可以如下操作:

python3 speedtest.py

Retrieving configuration...

Testing from China Telecom (1.84.212.150)...

Retrieving server list...

Selecting best server based on ping...

Hosted by Xi'an branch,Chinaunicom (Xi'an) [19.75 km]: 18.86 ms

Testing download speed................................................................................

Download: 79.70 Mbit/s

Testing upload speed......................................................................................................

Upload: 21.90 Mbit/s

其实这个speedtest.py也就是脚本了

可以直接如下:

cp speedtest.py speedtest

➜ speedtest-cli git:(master) ✗ chmod 755 speedtest-cli.1

➜ speedtest-cli git:(master) ✗ chmod 755 speedtest

➜ speedtest-cli git:(master) ✗ ./speedtest

Retrieving configuration...

Testing from China Telecom (1.84.212.150)...

Retrieving server list...

Selecting best server based on ping...

Hosted by China Unicom Lanzhou Branch Co.Ltd (Lanzhou) [483.74 km]: 24.266 ms

Testing download speed................................................................................

Download: 96.11 Mbit/s

Testing upload speed................................................................................................

Upload: 21.86 Mbit/s

其实默认下载之后的介绍很详细了

Versions

--------speedtest-cli works with Python 2.4-3.7

.. image:: https://img.shields.io/pypi/pyversions/speedtest-cli.svg

:target: /pypi/speedtest-cli/

:alt: Versions

Installation------------pip / easy_install~~~~~~~~~~~~~~~~~~~::

pip install speedtest-clior:: easy_install speedtest-cliGithub~~~~~~::

pip install git+/sivel/speedtest-cli.git

or

::

git clone /sivel/speedtest-cli.git

cd speedtest-cli

python setup.py install

Just download (Like the way it used to be)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

::

wget -O speedtest-cli /sivel/speedtest-cli/mas

ter/speedtest.py

chmod +x speedtest-cli

or

::

curl -Lo speedtest-cli /sivel/speedtest-cli/ma

ster/speedtest.py

chmod +x speedtest-cli

Usage

-----

::

$ speedtest-cli -h

usage: speedtest-cli [-h] [--no-download] [--no-upload] [--single] [--bytes]

[--share] [--simple] [--csv]

[--csv-delimiter CSV_DELIMITER] [--csv-header] [--json]

[--list] [--server SERVER] [--exclude EXCLUDE]

[--mini MINI] [--source SOURCE] [--timeout TIMEOUT]

[--secure] [--no-pre-allocate] [--version]

Command line interface for testing internet bandwidth using .

--------------------------------------------------------------------------

/sivel/speedtest-cli

optional arguments:

-h, --help show this help message and exit

--no-download Do not perform download test

--no-upload Do not perform upload test

--single Only use a single connection instead of multiple. This

simulates a typical file transfer.

--bytes Display values in bytes instead of bits. Does not

affect the image generated by --share, nor output from

--json or --csv

--share Generate and provide a URL to the share

results image, not displayed with --csv

--simple Suppress verbose output, only show basic information

--csv Suppress verbose output, only show basic information

in CSV format. Speeds listed in bit/s and not affected

by --bytes --csv-delimiter CSV_DELIMITER Single character delimiter to use in CSV output.

Default ","

--csv-header Print CSV headers --json Suppress verbose output, only show basic information in JSON format. Speeds listed in bit/s and not

另外感兴趣的可以看下linux下的axel多进程下载,将本地带宽抛满很好的测试工具。

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。