admin 发表于 2023-5-19 15:35:44

linux系统查看网卡速度方法

使用speedtest-cli命令查看下载和上传最大流量
yum install -y python-pip

或者python get-pip.py

python get-pip.py
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.
Collecting pip<21.0
Downloading pip-20.3.4-py2.py3-none-any.whl (1.5 MB)
   |????????????????????????????????| 1.5 MB 29 kB/s
Collecting wheel
Downloading wheel-0.37.1-py2.py3-none-any.whl (35 kB)
Installing collected packages: pip, wheel
Successfully installed pip-20.3.4 wheel-0.37.1



安装speedtes-cli
pip install speedtest-cli
pip install speedtest-cli
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.
Collecting speedtest-cli
Downloading speedtest_cli-2.1.3-py2.py3-none-any.whl (23 kB)
Installing collected packages: speedtest-cli
Successfully installed speedtest-cli-2.1.3


# speedtest
speedtest      speedtest-cli
# speedtest
speedtest      speedtest-cli
# speedtest-cli
Retrieving speedtest.net configuration...
Testing from Unknown (202.60.126.184)...
Retrieving speedtest.net server list...
Selecting best server based on ping...
Hosted by 天津电信 (TianJin) : 42.105 ms
Testing download speed................................................................................
Download: 27.61 Mbit/s
Testing upload speed................................................................................................
Upload: 27.80 Mbit/s
#



使用nload命令查看:

yum install -y nload


或者dstat -n 命令:



再或者使用ethtool eth0
查看网卡。

admin 发表于 2023-5-19 15:48:15

# cat /sys/class/net/eth0/speed
# cat /sys/class/net/enp2s0f0/speed
1000

# cat /sys/class/net/enp130s0f0/speed
10000


页: [1]
查看完整版本: linux系统查看网卡速度方法