Quantcast
Channel: CodeSection,代码区,Linux操作系统:Ubuntu_Centos_Debian - CodeSec
Viewing all articles
Browse latest Browse all 11063

linux ethtool 查看网卡状态

$
0
0

背景:网卡流量80,如果是100M的网卡可能是瓶颈,而如何知道这个网卡是100M还是1000M的?用命令查询一下。

物理机上:

ethtool eth0

Settings for eth0: Supported ports: [ TP ] Supported link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full 1000baseT/Full Supported pause frame use: Symmetric Supports auto-negotiation: Yes Advertised link modes:10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full 1000baseT/Full

阿里私有云虚拟的网卡有些简单:

ethtool eth0

Settings for eth0:

Link detected: yes

ethtool 工具关于网络协商功能介绍;

ethtool - Display or change ethernet card settings(ethtool 是用来显示和更改网卡设置的工具);这个工具比较复杂,功能也特别多。由于洋文比较难懂。所以我们还是把网络设备协商方式的设置方法说一说。

2.1 ethtool 显示网络端口设置功能;

这个功能比较好办。就是ethtool 后面直接接网}}接口就行;比如下面的例子;

[root@localhost ~]# ethtool eth0

Settings for eth0:

Supported ports: [ TP MII ]

Supported link modes: 10baseT/Half 10baseT/Full

100baseT/Half 100baseT/Full

Supports auto-negotiation: Yes

Advertised link modes: 10baseT/Half 10baseT/Full

100baseT/Half 100baseT/Full

Advertised auto-negotiation: No 注:自动协商关闭

Speed: 100Mb/s 注:速度 100Mb

Duplex: Full 注:全双工

Port: MII

PHYAD: 32

Transceiver: internal

Auto-negotiation: off

Supports Wake-on: pumbg

Wake-on: d

Current message level: 0x00000007 (7)

Link detected: yes 注:eth0已经激活;

摘自:https://my.oschina.net/u/1986074/blog/517033


Viewing all articles
Browse latest Browse all 11063

Trending Articles