Testing ethernet interface status
Peter Steele
psteele at maxiscale.com
Thu Apr 1 19:00:38 UTC 2010
>I was going to suggest that you look at the ifconfig(8) source code, but then I did so myself - it looks like you're doing it pretty much exactly how they are. I've never >noticed ifconfig(8) returning an incorrect value, not to say it's not possible.
>
>Are you sure that nothing is causing interface state resets? i.e.
>mismatched duplex/speed settings between the FreeBSD machine and the switch? Have you checked dmesg(8) for logs of interface state changes?
>You can also check the output of 'netstat -i' to check for interface errors.
I should have added that when our own monitoring code flags one of these false positives, there is no entry in /var/log/messages indicating that the nic has gone offine. I added a second call to confirm that indeed the interface is offline, and this second check seems to have largely solved the problem, but we have seen a case where even two consecutive checks return false positives. Maybe we need three tests?
More information about the freebsd-questions
mailing list