標籤:linux下mii-tool ethtool 命令簡單的使用
################################################################
通過命令查看linux網卡的物理資訊,狀態:
[[email protected] ~]# mii-tool eth0
eth0: negotiated 100baseTx-FD, link ok
-V 顯示版本資訊; -v 顯示網路介面的資訊;
-R 重設MII到開啟狀態; -r 重啟自動協商模式;
-w 查看網路介面串連的狀態變化; -l 寫入事件到系統日誌;
-A 指令特定的網路介面; -F 更改網路介面協商方式;
如果我們想把網路介面eth0改為1000Mb/s全雙工系統的模式應該怎麼辦呢?
[[email protected] ~]# mii-tool -F 100baseTx-FD
#################################################################
通過mii-tool命令查看的資訊實在是太少了,還可用下面的命令查看更多的網卡資訊。
通過ethtool eth0來查看更多的底層資訊:
[[email protected] ~]# 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: No //是否支援熱插拔
Supports auto-negotiation: Yes //是否支援自動協商
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Advertised pause frame use: No
Advertised auto-negotiation: Yes
Speed: 1000Mb/s //速率
Duplex: Full //全雙工系統
Port: Twisted Pair //電口
PHYAD: 0
Transceiver: internal
Auto-negotiation: on
MDI-X: Unknown
Supports Wake-on: d
Wake-on: d
Current message level: 0x00000007 (7)
drv probe link
Link detected: yes
通過ethtool -i eth0 可以來查看網卡的驅動資訊:
[[email protected] ~]# ethtool -i eth0 //網卡的驅動版本
driver: e1000
version: 7.3.21-k8-NAPI
firmware-version:
bus-info: 0000:02:01.0
supports-statistics: yes
supports-test: yes
supports-eeprom-access: yes
supports-register-dump: yes
supports-priv-flags: no
可以通過ethtool -S eth0來查看網卡的工作狀態:
如:可以查看網卡的輸入資料流量,輸出資料流量,輸入包,輸出包,輸入的廣播,輸出的廣播,輸入的網路錯包,輸出的網路錯包等。。。
linux 下mii-tool ethtool 命令簡單的使用