zoukankan      html  css  js  c++  java
  • Linux测试上行和下载速率

    下载安装speedtest-cli测试工具

    方法一:
    pip3 install speedtest-cli
    方法二:
    wget https://github.com/sivel/speedtest-cli/archive/master.zip
    unzip master.zip
    cd speedtest-cli-master/
    chmod +x speedtest_cli.py

    执行speedtest.py进行网速测试

      首先我们采用pip的方式进行安装,我们需要进入python安装文件包的路径。
    pip3 install speedtest-cli --upgrade

    Requirement already up-to-date: speedtest-cli in /usr/local/python3/lib/python3.6/site-packages (2.0.2)
    

      从上面我们可以找到python软件包的安装路径,然后进入此路径。
    cd /usr/local/python3/lib/python3.6/site-packages/
    chmod +x speedtest.py
    ./speedtest.py --bytes

    Retrieving speedtest.net configuration...
    Testing from International Pioneering Park (114.114.114.114)...
    Retrieving speedtest.net server list...
    Selecting best server based on ping...
    Hosted by Beijing Telecom (Beijing) [1.69 km]: 3.782 ms
    Testing download speed................................................................................
    Download: 1.09 Mbyte/s
    Testing upload speed................................................................................................
    Upload: 1.08 Mbyte/s
    

    命令参数

    • speedtest.py --bytes以字节计算的方式来测试上下行速度
    • speedtest.py --share将速度测试的结果生成一张图片的连接,便于你分享
    • speedtest.py --simple只显示ping和上下行速度
    • speedtest.py --list 列出speedtest.net所有的服务器距离你的物理距离,单位是千米(km)
        由此我们可以测试出上传和下载的速率。
  • 相关阅读:
    TCP 协议如何解决粘包、半包问题 转载:https://mp.weixin.qq.com/s/XqGCaX94hCvrYI_Tvfq_yQ
    [国家集训队]happiness
    CF592D Super M
    [APIO2010]巡逻
    [NOI2012]美食节
    [JSOI2008]Blue Mary的旅行
    [十二省联考2019]D1T2字符串问题
    [十二省联考2019]D2T2春节十二响
    [十二省联考2019]D1T1异或粽子
    [WC2008]游览计划
  • 原文地址:https://www.cnblogs.com/Cherry-Linux/p/9121826.html
Copyright © 2011-2022 走看看