Operating System - Linux
1829550 Members
2066 Online
109992 Solutions
New Discussion

difference between cat /proc/net/nicinfo/eth0.info and /sbin/mii-tool -v eth0

 
SOLVED
Go to solution
Vincent DANTEN
Occasional Advisor

difference between cat /proc/net/nicinfo/eth0.info and /sbin/mii-tool -v eth0

Hi guys,

these two commands send back different values for the speed/duplex.
Which is the correct one ?

Thankx



[root@lx001082 init.d]# cat /proc/net/nicinfo/eth0.info
Description HP NC7781 Gigabit Server Adapter
Driver_Name bcm5700
Driver_Version 6.2.17a
Bootcode_Version 5703-v2.33
System_Device_Name eth0
.../...
Auto_Negotiate on
.../...
Speed 100
Duplex half
Flow_Control off
State up
MTU_Size 1500

AND

[root@lx001082 init.d]# /sbin/mii-tool -v eth0
eth0: 100 Mbit, full duplex, link ok
product info: vendor 00:08:18, model 22 rev 2
basic mode: 100 Mbit, full duplex
basic status: link ok
capabilities: 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD
advertising: 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD flow-control

3 REPLIES 3
Kodjo Agbenu
Honored Contributor
Solution

Re: difference between cat /proc/net/nicinfo/eth0.info and /sbin/mii-tool -v eth0

Hello Vincent,

/proc/net/nicinfo/eth0.info does not come with all NIC drivers. I'm confident that information returned by mii-tool or ethtool is accurate.

Good luck,

Kodjo

(C'est la 1ere fois qu'on se croise sur ce forum. Je suis moins assidu que par le passé, manque de temps. A+
Learn and explain...
Stuart Browne
Honored Contributor

Re: difference between cat /proc/net/nicinfo/eth0.info and /sbin/mii-tool -v eth0

Much to my chargin, it appears as if 'ethtool' is a bit more reliable. I'm yet to see 'mii-tool' report giga-bit connections.
One long-haired git at your service...
Vincent DANTEN
Occasional Advisor

Re: difference between cat /proc/net/nicinfo/eth0.info and /sbin/mii-tool -v eth0

hi,

It seems that ethtool reports in this case :


Supports auto-negotiation: Yes
Advertised link modes: Not reported
Advertised auto-negotiation: No
Speed: 100Mb/s
Duplex: Half
Port: Twisted Pair
PHYAD: 0
Transceiver: internal

So the mii-tool will go to the trash...