易陆发现互联网技术论坛

 找回密码
 开始注册
查看: 519|回复: 1
收起左侧

linux系统查看网卡速度方法

[复制链接]
发表于 2023-5-19 15:35:44 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?开始注册

x
使用speedtest-cli命令查看下载和上传最大流量
2 G* n' _9 q* p! vyum install -y python-pip  
, u6 b) W5 w' b! v: X2 z0 R+ S4 u% ^' Q
或者python get-pip.py" J" P6 _3 T8 z/ A) K

, `) C& E! p7 m0 Y5 T% D python get-pip.py
  c1 t& W! ^2 r( v* N) V9 GDEPRECATION: 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/de ... s/#python-2-support pip 21.0 will remove support for this functionality.
7 u/ Z) o8 `2 jCollecting pip<21.0
: S( P9 A4 K1 B0 p/ o  Downloading pip-20.3.4-py2.py3-none-any.whl (1.5 MB)
2 _# i% n' }* o, F! K) k% F     |????????????????????????????????| 1.5 MB 29 kB/s 6 w1 D2 B# T6 K( X; P  ~* y9 f
Collecting wheel! N6 O5 f% S' h# W, F' U5 K
  Downloading wheel-0.37.1-py2.py3-none-any.whl (35 kB)5 i0 U8 f5 R$ v' v# m: b
Installing collected packages: pip, wheel
# u% X: S% I2 ]$ ^/ m8 B- b& uSuccessfully installed pip-20.3.4 wheel-0.37.1. S7 d7 P. H. ?, F( X" Q# K2 A

& q5 a3 w) \  b+ @, _% r3 a. A3 }; g. Z9 G* b

7 S7 e' U9 f; ]6 S安装speedtes-cli  8 ]5 g* E; D5 W3 T7 Y8 F* _) w
pip install speedtest-cli
4 p+ C/ u, W  O/ ~3 Xpip install speedtest-cli
! I& }! ^, d& A. YDEPRECATION: 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/de ... s/#python-2-support pip 21.0 will remove support for this functionality.3 g/ y+ J( s, F8 N/ C
Collecting speedtest-cli
+ i; ~' T1 Q$ d0 @  Downloading speedtest_cli-2.1.3-py2.py3-none-any.whl (23 kB)
6 H# p' y% D+ }' a0 [" LInstalling collected packages: speedtest-cli) j3 a5 l, s, v9 n0 q+ u7 a! G# T
Successfully installed speedtest-cli-2.1.3
) h  e" p& o$ Y0 v1 F$ e
* w2 g; j9 n3 o  T; s9 I6 \5 ^% Y; P) J% i% i9 @4 @: p
[root@test-vm ~]# speedtest/ s$ Y$ d! H( S/ d7 |8 t% ~
speedtest      speedtest-cli  
7 z) k( e/ N! }: }: G6 U[root@test-vm ~]# speedtest
6 c  J1 I2 E7 yspeedtest      speedtest-cli  
: W: e. M2 r6 H# A" C7 ]4 L* B[root@test-vm ~]# speedtest-cli
% r# m% r* @  ^  hRetrieving speedtest.net configuration...
: m# o  c( o" m! z, I" C8 nTesting from Unknown (202.60.126.184)...
$ O% g: D: @/ ~1 E' A0 w' ARetrieving speedtest.net server list...1 a1 y& J8 l" d6 W7 o3 _  i
Selecting best server based on ping...
  @7 u6 k% H  l0 N2 \* p, zHosted by 天津电信 (TianJin) [565.12 km]: 42.105 ms9 v! C4 d1 L, B
Testing download speed................................................................................
% d; `# s- O5 Z/ ^Download: 27.61 Mbit/s9 m3 u; z6 X+ t! p- c6 z2 l# |
Testing upload speed................................................................................................
6 }7 b$ B- t- |) _( e5 B* w6 uUpload: 27.80 Mbit/s$ \! j: {* ^1 L/ x! ^) X- z
[root@test-vm ~]# : J( u7 f* ]' v5 t  [  U7 X
5 F8 P) A4 m1 \% H' K  t) J

8 f  g5 u* X' R5 B6 s2 U8 m- r& l7 }/ l2 n9 R# Q6 m
使用nload命令查看:
0 B3 S% n% E- E% J& J6 x% m: e" o) q7 }7 j
yum install -y nload
' A1 u# l: g; i0 _: z
: r4 A4 u, ~, r: |0 S
4 L" F5 D( L. E0 ?- |6 V或者dstat -n 命令:/ I+ q0 P/ W7 z; a1 Q) y

' y0 S' f3 ?# r- }" J% m" \5 j; I9 ^0 }7 @: T+ x! A/ H; f

5 E& o* {( n5 h* ]  o7 }% P再或者使用ethtool eth0- K* o/ d+ e. p# Z
查看网卡。- y0 {5 _  o+ v% a# B0 g+ {
 楼主| 发表于 2023-5-19 15:48:15 | 显示全部楼层
[root@0002 ~]# cat /sys/class/net/eth0/speed 3 T, v3 `9 W- ?
[root@ ~]# cat /sys/class/net/enp2s0f0/speed
+ \' Z2 l+ L2 ~, ~, c7 Q  N' \1000- z4 h8 @# Z# ?* u$ ?4 M
8 u; h3 W/ Z8 I2 F+ V* M, H
[root@controller1 ~]# cat /sys/class/net/enp130s0f0/speed ! z, ^% I0 R. Q9 x1 t
10000/ A. k. o5 f# o0 o6 _3 ?$ D

5 }. X0 Z6 H0 D7 j! `* U* M" J$ b! J) y% h& P: d
您需要登录后才可以回帖 登录 | 开始注册

本版积分规则

关闭

站长推荐上一条 /4 下一条

北京云银创陇科技有限公司以云计算运维,代码开发

QQ|返回首页|Archiver|小黑屋|易陆发现技术论坛 ( 蜀ICP备2026014127号-1 )点击这里给我发消息

GMT+8, 2026-4-8 21:36 , Processed in 0.047108 second(s), 23 queries .

Powered by Discuz! X3.4 Licensed

© 2012-2025 Discuz! Team.

快速回复 返回顶部 返回列表