Date: Thu, 1 Apr 2010 14:00:36 -0500 From: Peter Steele <psteele@maxiscale.com> To: Steve Polyack <korvus@comcast.net> Cc: "freebsd-questions@freebsd.org" <freebsd-questions@freebsd.org> Subject: RE: Testing ethernet interface status Message-ID: <7B9397B189EB6E46A5EE7B4C8A4BB7CB3B65FC97@MBX03.exg5.exghost.com> In-Reply-To: <4BB4EC44.2070804@comcast.net> References: <7B9397B189EB6E46A5EE7B4C8A4BB7CB3B65FC5D@MBX03.exg5.exghost.com> <4BB4EC44.2070804@comcast.net>
next in thread | previous in thread | raw e-mail | index | archive | help
>I was going to suggest that you look at the ifconfig(8) source code, but t= hen 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, n= ot to say it's not possible. > >Are you sure that nothing is causing interface state resets? i.e.=20 >mismatched duplex/speed settings between the FreeBSD machine and the switc= h? Have you checked dmesg(8) for logs of interface state changes? =20 >You can also check the output of 'netstat -i' to check for interface error= s. I should have added that when our own monitoring code flags one of these fa= lse positives, there is no entry in /var/log/messages indicating that the n= ic has gone offine. I added a second call to confirm that indeed the interf= ace is offline, and this second check seems to have largely solved the prob= lem, but we have seen a case where even two consecutive checks return false= positives. Maybe we need three tests?
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?7B9397B189EB6E46A5EE7B4C8A4BB7CB3B65FC97>