首页 > 编程知识 正文

Linux查看网络带宽

时间:2023-05-04 12:09:42 阅读:257260 作者:2284

查看网络设备接口,ifconfig命令执行后,结果如下,其中lo是本地环回接口。我们要查的是ens160。 ubuntu@junyan-51:~$ ifconfigens160 Link encap:Ethernet HWaddr 00:50:56:bf:1f:b9 inet addr:192.168.8.51 Bcast:192.168.8.255 Mask:255.255.255.0 inet6 addr: fe80::250:56ff:febf:1fb9/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:39259841 errors:0 dropped:5400 overruns:0 frame:0 TX packets:34924409 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:765113675318 (765.1 GB) TX bytes:443557003596 (443.5 GB)lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:151908495 errors:0 dropped:0 overruns:0 frame:0 TX packets:151908495 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1 RX bytes:3676577868252 (3.6 TB) TX bytes:3676577868252 (3.6 TB) 查网卡带宽。sudo ethtool ens160 ubuntu@junyan-51:~$ sudo ethtool ens160Settings for ens160:Supported ports: [ TP ]Supported link modes: 1000baseT/Full 10000baseT/Full Supported pause frame use: NoSupports auto-negotiation: NoAdvertised link modes: Not reportedAdvertised pause frame use: NoAdvertised auto-negotiation: NoSpeed: 10000Mb/sDuplex: FullPort: Twisted PairPHYAD: 0Transceiver: internalAuto-negotiation: offMDI-X: UnknownSupports Wake-on: uagWake-on: dLink detected: yes

结果是10000Mb/s。

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。