Hey there, we've just set up ~30 new Proxmox nodes.
As you can imagine, some links were... wonky.
Not having any kind of basic interface information like connection status (up|down), link speed, etc. in the GUI is a real PITA.
We really didn't notice some links being down due to bonding...
As was mentioned by
@jsterr in that bugzilla, having at least the "green lamp" next to the interface would be a huge improvement.
Until such improvements arrive, i modified what
@jsterr posted above to show speed instead of ip-addresses:
Bash:
# https://forum.proxmox.com/threads/determine-link-status-via-proxmox-ui-on-vmbrs-with-linux-vlans.132545/
#exclude some interfaces, e.g. all vlans, to keep the list clean
INTERFACES=`ip -br a | awk '{print $1}' | grep -v ^lo$ | grep -v enx | grep -vi ^v | sort`
for INTERFACE in $INTERFACES
do
INTSTATUS=`ip -brief address | grep ^$INTERFACE | awk '{print $2}'`
INTSPEED=`ethtool $INTERFACE | grep Speed | awk '{print $2}'`
echo $INTERFACE $INTSTATUS $INTSPEED >> /tmp/interfacestatus
done
#formatting to show the notes as a table in the GUI
awk '{ $1=$1; gsub(" ", "|"); printf "|%s|\n", $0 }' /tmp/interfacestatus > /tmp/interfacetemp && mv /tmp/interfacetemp /tmp/interfacestatus
sed -i '1s/^/|Interface|Status |Link-Speed| \n/' /tmp/interfacestatus
sed -i '2s/^/|--|--|--| \n/' /tmp/interfacestatus
echo "|||" >> /tmp/interfacestatus
pvesh set /nodes/`hostname`/config --description "$(cat /tmp/interfacestatus)"
#cat so we can also easily just run it directly and see the output
cat /tmp/interfacestatus
rm /tmp/interfacestatus
Result:
(yes we use .link files to name our interfaces, as mentioned here
https://forum.proxmox.com/threads/netzwerkadapter-namen-wechseln-nach-reboot.123924/post-539697)
View attachment 68924