Heiko Ankenbrand

Interface speed and duplex as list

Discussion created by Heiko Ankenbrand Champion on Mar 1, 2018
Latest reply on Mar 9, 2018 by hong jungil

This command shows the interface speed and duplex as list for R77.xx and R80.10.

 

# ifconfig -a | grep encap | awk '{print $1}' | grep -v lo | grep -v bond | grep -v ":" | grep -v ^lo | xargs -I % sh -c 'ethtool %; ethtool -i %' | grep '^driver\|Speed\|Duplex\|Setting' | sed "s/^/ /g" | tr -d "\t" | tr -d "\n" | sed "s/Settings for/\nSettings for/g" | awk '{print $5 " "$7 "\t " $9 "\t" $3}' | grep -v "Unknown" | grep -v "\."

 

 

Version 1.1

 

 

A older version of the document can be found under the following link:

Regards,

Heiko

Outcomes