From owner-freebsd-hackers@FreeBSD.ORG Sat Aug 4 19:53:01 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 64BB1106564A for ; Sat, 4 Aug 2012 19:53:01 +0000 (UTC) (envelope-from freebsd@damnhippie.dyndns.org) Received: from qmta07.emeryville.ca.mail.comcast.net (qmta07.emeryville.ca.mail.comcast.net [76.96.30.64]) by mx1.freebsd.org (Postfix) with ESMTP id 4723C8FC0C for ; Sat, 4 Aug 2012 19:53:01 +0000 (UTC) Received: from omta07.emeryville.ca.mail.comcast.net ([76.96.30.59]) by qmta07.emeryville.ca.mail.comcast.net with comcast id igUc1j00A1GXsucA7jrvWi; Sat, 04 Aug 2012 19:51:55 +0000 Received: from damnhippie.dyndns.org ([24.8.232.202]) by omta07.emeryville.ca.mail.comcast.net with comcast id ijru1j00D4NgCEG8UjrvGi; Sat, 04 Aug 2012 19:51:55 +0000 Received: from [172.22.42.240] (revolution.hippie.lan [172.22.42.240]) by damnhippie.dyndns.org (8.14.3/8.14.3) with ESMTP id q74JpreW005352; Sat, 4 Aug 2012 13:51:53 -0600 (MDT) (envelope-from freebsd@damnhippie.dyndns.org) From: Ian Lepore To: Tim Kientzle In-Reply-To: References: Content-Type: text/plain; charset="windows-1251" Date: Sat, 04 Aug 2012 13:51:52 -0600 Message-ID: <1344109912.1128.94.camel@revolution.hippie.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 8bit Cc: freebsd-hackers Subject: Re: How to Expose Chip-level Ethernet Statistics? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Aug 2012 19:53:01 -0000 On Sat, 2012-08-04 at 12:21 -0700, 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). > > Is there a standard way to do this? > > 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…) > > Pointers appreciated… In particular, if there's another > Ethernet driver that does this well, I can use that for a > reference. > > Tim I don't know if this is exactly what you mean, but have a look at src/tools/tools/ifinfo, and find some examples of drivers that fill in that info by grepping for ifmib_iso_8802_3. (I really know nothing about this stuff, except that your request triggered a memory that the atmel if_ate driver gathers some stats that I've not seen in most other drivers.) -- Ian