kernelkit / infix

Linux :yellow_heart: NETCONF = Infix
https://kernelkit.org
GNU General Public License v2.0
49 stars 11 forks source link

List speed/duplex status of Ethernet ports in CLI "show interfaces" summary #530

Open jovatn opened 3 months ago

jovatn commented 3 months ago

Description

It would be good to see speed/duplex status for physical Ethernet ports when listing interfaces. Alternatively, if we could list just Ethernet ports.

Additional Information

Today, this is what we see when running "show interfaces" (on a physical product).

admin@infix-06-11-00:/> show interfaces 
INTERFACE       PROTOCOL   STATE       DATA                                     
lo              ethernet   UP          00:00:00:00:00:00                        
                ipv4                   127.0.0.1/8 (static)
                ipv6                   ::1/128 (static)
e1              ethernet   LOWER-DOWN  e2:03:b5:06:11:01                        
e2              ethernet   LOWER-DOWN  e2:03:b5:06:11:02                        
e3              ethernet   UP          e2:03:b5:06:11:03                        
                ipv6                   fe80::e003:b5ff:fe06:1103/64 (link-layer)
e4              ethernet   UP          e2:03:b5:06:11:04                        
                ipv6                   fe80::e003:b5ff:fe06:1104/64 (link-layer)
e5              ethernet   UP          e2:03:b5:06:11:05                        
                ipv6                   fe80::e003:b5ff:fe06:1105/64 (link-layer)
e6              ethernet   DOWN        e2:03:b5:06:11:06                        
                ipv6                   fe80::e003:b5ff:fe06:1106/64 (link-layer)
e7              ethernet   LOWER-DOWN  e2:03:b5:06:11:07                        
e8              ethernet   LOWER-DOWN  e2:03:b5:06:11:08                        
e9              ethernet   LOWER-DOWN  e2:03:b5:06:11:09                        
e10             ethernet   UP          e2:03:b5:06:11:0a                        
                ipv6                   fe80::e003:b5ff:fe06:110a/64 (link-layer)
admin@infix-06-11-00:/> 

It is possible to show speed/duplex status when running the command to show interface details

admin@infix-06-11-00:/> show interfaces name e4
name                : e4
index               : 9
mtu                 : 1500
operational status  : up
auto-negotiation    : off
duplex              : full
speed               : 100
physical address    : e2:03:b5:06:11:04
ipv4 addresses      :
ipv6 addresses      : fe80::e003:b5ff:fe06:1104/64 (link-layer)
in-octets           : 635691
out-octets          : 646620

eth-in-frames                : 2832
eth-in-multicast-frames      : 2830
eth-in-broadcast-frames      : 0
eth-in-error-fcs-frames      : 1
eth-in-error-oversize-frames : 0
eth-out-frames               : 2809
eth-out-multicast-frames     : 2800
eth-out-broadcast-frames     : 0
eth-out-good-octets          : 646927
eth-in-good-octets           : 662518
admin@infix-06-11-00:/> 

For some inspiration, see the "Speed" column (and possibly also the Type column) in this example.

General Information

Anyone can help out by sponsoring development of new features or contributing pull requests. Please use this issue for discussions related to the feature.

troglobit commented 3 weeks ago

CCB: should probably be a separate command, e.g., show ports. Discuss later.