CentOS 使用speedtest命令行测试网速

安装speedtest-cli

speedtest-cli是一个用Python编写的轻量级Linux命令行工具,在Python2.4至3.4版本下均可运行。它基于Speedtest.net的基础架构来测量网络的上/下行速率。安装speedtest-cli很简单——只需要下载其Python脚本文件。

[root@localhost ~]# wget https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py
[root@localhost ~]# chmod +rx speedtest.py
[root@localhost ~]# mv speedtest.py /usr/local/bin/speedtest-cli
[root@localhost ~]# chown root:root /usr/local/bin/speedtest-cli

使用speedtest-cli测试网速

[root@localhost ~]# speedtest-cli

输入这个命令后,它会自动发现离你最近的Speedtest.net服务器(地理距离),然后打印出测试的网络上/下行速率。

[root@localhost ~]# speedtest-cli
Retrieving speedtest.net configuration...
Testing from Topway Global Limited ...
Retrieving speedtest.net server list...
Selecting best server based on ping...
Hosted by 1010 (Wan Chai) [2.24 km]: 9.427 ms
Testing download speed................................................................................
Download: 96.07 Mbit/s
Testing upload speed................................................................................................
Upload: 93.58 Mbit/s

文章来源:https://www.cnaaa.net,转载请注明出处:https://www.cnaaa.net/archives/5160

(0)
郭靖的头像郭靖
上一篇 2022年6月25日 下午6:08
下一篇 2022年6月30日 下午6:50

相关推荐

  • Linux Top 命令指南

    top 命令允许用户监视 Linux 上的进程和系统资源使用情况,它是系统管理员工具箱中最有用的工具之一,并且在每个发行版中都预装了它。与 ps 等其他命令不同,它是交互式的,我们可以浏览进程列表、终止进程,等等。本文中,我们将了解如何使用 top 命令。 Getting started top 命令非常简单,只需要在终端中输入 top 即可。top 指令将…

    2022年12月13日
    93500
  • nmcli命令详解

    以下是nmcli命令的一些常用选项和用法: 1)修改网卡名称 2)添加网卡 3)启动或停止网卡 4)设置网卡获取IP模式 使用 nmcli 来设置网卡为静态IP ,可以使用以下命令: 使用nmcli命令将网卡eth0模式设置为dhcp

    2023年10月10日
    1.4K00
  • Windows配置磁盘监控

    通过pushgateway的方式,主动推送监控数据给prometheus。 由于windows平台的诸多限制,导致推送比较艰难。有两种方法完成监控。 1.通过python等语言,做推送脚本。 2.曲线救国就是把监控数据scp发给Linux机器。再通过linux做二次加工推给pushgateway。 window server上配置环境 1.首先判断服务器磁盘…

    2022年11月25日
    1.1K00
  • Centos在dracut模式下如何修改系统配置文件

    1、进入dracut原因 Centos系统进入dracut的原因有很多比如:系统重要文件丢失系统配置文件配置错误等 2、恢复系统文件 2.1、dracut环境 在dracut上下文中是无法看到Centos系统文件的dracut# 2.2、找到系统盘 Centos默认安装时,系统盘是一个lv设备 如果安装时,手动修改了分区,那么可以根据实际情况找到系统设备比如…

    2023年6月12日
    1.4K00
  • Nginx 升级后 模块无法使用提示报错,ngx_stream_module.so” version 1014000 instead of 1016000

    原因: nginx 1.16 升级到 1.19 后 ,重启nginx 后提示报错 报错内容: ngx_stream_module.so” version 1014000 instead of 1016000 , 方法: 1、网上的讲法 都是是让你卸载 yum remove nginx-mod* 再安装 yum install nginx-modu…

    Linux系统 2023年2月3日
    1.1K00

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

在线咨询: QQ交谈

邮件:712342017@qq.com

工作时间:周一至周五,8:30-17:30,节假日休息

关注微信