Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 6 Aug 2012 10:07:37 -0400
From:      John Baldwin <jhb@freebsd.org>
To:        freebsd-hackers@freebsd.org
Cc:        Tim Kientzle <kientzle@freebsd.org>
Subject:   Re: How to Expose Chip-level Ethernet Statistics?
Message-ID:  <201208061007.37898.jhb@freebsd.org>
In-Reply-To: <D964DD93-51C6-43AE-B18A-09DEC4AB59FA@freebsd.org>
References:  <D964DD93-51C6-43AE-B18A-09DEC4AB59FA@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Saturday, August 04, 2012 3:21:23 pm Tim Kientzle wrote:
> I believe that some of the issues I'm having with this
> Ethernet driver might be easier to diagnose if I could
> expose the chip-level statistics counters (especially queue
> overrun counts).
>=20
> Is there a standard way to do this?
>=20
> I've looked at systat, netstat, and ifconfig but haven't
> yet found a standard tool that queries this sort of
> information.  (If I could find that, I could figure out
> which ioctl it used=85)
>=20
> Pointers appreciated=85  In particular, if there's another
> Ethernet driver that does this well, I can use that for a
> reference.

Several drivers (igb, em, cxgb, cxgbe, ixgbe, etc.) just expose
a "stats" sysctl node under the device and populate that with
stats.  Typically they install a SYSCTL_PROC() that directly
queries the register.  In some cases they read the registers
via a timer and cache the results and the sysctl handlers returned
the cached results.

=2D-=20
John Baldwin



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201208061007.37898.jhb>