Created
August 2, 2017 23:34
-
-
Save cseelye/e0d7da9eb1ee5a57ba11352551d94d8f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
for nic in $(find /sys/class/net/ -type l); do | |
# Only look at physical NICs | |
[[ $(readlink -f ${nic}) =~ "virtual" ]] && continue | |
echo "=========================================================" | |
ifname=$(basename ${nic}) | |
ifconfig ${ifname} | |
ethtool ${ifname} | grep --color=none "Supported ports:" | sed -re 's/^\s+//g' | |
ethtool -i ${ifname} | grep --color=none bus-info | sed -re 's/^\s+//g' | |
echo | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment