Results 1 to 1 of 1
Thread: Monitor eth link state
Enjoy an ad free experience by logging in. Not a member yet? Register.
- Join Date
- Feb 2005
Monitor eth link state
So for example, if the switch power cycles, the linux server will log eth0 link state changed to down at 5:05 pm. And when the switch is back, it would log eth0 link state changed to up at 5:06 pm.
I know how to get the link state (so far the only reliable tool I found is mii-tool). I could use a cron job that would check every minute with mii-tool, but I would rather a program (or daemon) that monitors it and then either runs a command or logs a message.
I read that ip monitor (rtmon) can do this, however I can't get that to work.
Does anyone know how I could do this?