0

I'm having issues with my ethernet dropping down from 10 GbE to 1 GbE and even sometimes down to 100 Mbps.

  1. I would like to receive a notification when this happens through something like healthchecks.io or email.
  2. I would like to toggle the port down and up again to try and force it to reconnect at 10 GbE speeds.

This is on an unraid machine.

How can I achieve this?

1 Answers1

1

It's possible that changing link speed triggers a udev event or something similar, but the first solution that comes to my mind is scheduling a shell script with the User Scripts plugin. You can monitor the link speed of an interface with ethtool, so I wrote a quick script to check the speed that i tested on my 6.11.5 unraid box.

#!/bin/bash

IFACE=eth0 SPEED=$(ethtool $IFACE | grep Speed | awk '{print $2}')

if [ $SPEED = "10000Mb/s" ]; then echo Correct Speed else echo Incorrect speed fi

You'll need to find a command that notifies you in a way that you like, maybe calling curl on with some web API would do the trick. This example works for gigabit, but if you want to use it for any other speed it'll need to be updated with the speed you're interested in.

To try resetting the interface you could try something like ip link set $IFACE down; ip link set $IFACE up, but I have no idea if that would do anything. Maybe you could wait until the issue pops up and then type that in by hand to try it.

Rob M
  • 1,513
  • 1
  • 12
  • 24