-1

I have small issue with my openwrt router. I want to know link-speed in format 10M,100M, 1000M, etc. or 10BaseT .. but I can't find it in /proc or with "ip" command also "dmesg" doesn't provide this data.

Have you any ideas where can I find it? If data be in Hex format it's enough for me. Thanks.

1
  • Did you also check /var/log/dmesg? Aug 8 '16 at 12:53
3

You can use the ethtool command

http://linux.die.net/man/8/ethtool

EDIT:

You need to check the 'Speed' section. Check below:

root ~ 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: 100Mb/s
    Duplex: Full
    Port: Twisted Pair
    PHYAD: 1
    Transceiver: internal
    Auto-negotiation: on
    MDI-X: off (auto)
    Supports Wake-on: pumbg
    Wake-on: g
    Current message level: 0x00000007 (7)
                   drv probe link
    Link detected: yes

As you can see, my card supports 10/100/1000 however, the 'Speed' section shows the speed it is currently running at:

Speed: 100Mb/s

6
  • thanks for answer, I haven't got ethtool in my openwrt router... is there any solution?
    – sjwrong
    Aug 8 '16 at 11:57
  • yes, of course, but I want to find out working speed, NO HW speed,
    – sjwrong
    Aug 8 '16 at 12:07
  • I've edited my answer to clarify.
    – Mugurel
    Aug 8 '16 at 12:12
  • Yes, that would be great, but I havent got this ethtool, So, Can you tell me from where ettoll reads this data? I mean some file in /proc or somthing like this. is it possibel? :) thanks much
    – sjwrong
    Aug 8 '16 at 12:15
  • 1
    @sjwrong google is your friend - seriously google.co.uk/search?q=openwrt+install+package and google.co.uk/search?q=openwrt+install+ethtool
    – user9517
    Aug 8 '16 at 12:26
1

After few hours of reading /proc/* files I have found solution. chipset: ar8113

"cat /proc/ar8113/port_status"

and output is:

LinkUp | NWay Mode Enabled RXPause Enabled | TXPause Enabled Duplex Enabled | Speed 100M

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.