2011/04/19

Using mii-tool/ethtools to sniff status of network interface

When I am trying using mii-tool on my new develop environment, Some error occur, and the log message like below:
# mii-tool -V mii-tool.c 1.9 2000/04/28 00:56:08 (David Hinds) SIOCGMIIPHY on 'eth0' failed: Operation not supported no MII interfaces found
Then I google this problem find out, mii-tool has lot of bug, and some net drivers didn't support it. So, I am trying using ethtool which have more compatibility. And it work great!!
# 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: Yes Speed: 100Mb/s Duplex: Full Port: MII PHYAD: 1 Transceiver: internal Auto-negotiation: on Link detected: yes
So, If just want to know about network status, Maybe ethtool is better than mii-tool, But, unfortunately, I still need to resolving mii-tool's problem for our environment. So, If you meet the trouble about "no MII interfaces found", make sure the mii-tool is follow up the newest one release. It would possible make the trouble disappear...or not...OTZ

沒有留言:

張貼留言