Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 22 Aug 2008 22:52:22 -0400
From:      John Baldwin <jhb@freebsd.org>
To:        pyunyh@gmail.com
Cc:        cvs-src@freebsd.org, src-committers@freebsd.org, cvs-all@freebsd.org, Pyun YongHyeon <yongari@freebsd.org>
Subject:   Re: cvs commit: src/sys/dev/bfe if_bfe.c if_bfereg.h
Message-ID:  <200808222252.22668.jhb@freebsd.org>
In-Reply-To: <20080823023406.GC9758@cdnetworks.co.kr>
References:  <200808220647.m7M6lAeL097786@repoman.freebsd.org> <200808221420.28017.jhb@freebsd.org> <20080823023406.GC9758@cdnetworks.co.kr>

next in thread | previous in thread | raw e-mail | index | archive | help
On Friday 22 August 2008 10:34:06 pm Pyun YongHyeon wrote:
> On Fri, Aug 22, 2008 at 02:20:27PM -0400, John Baldwin wrote:
>  > On Friday 22 August 2008 02:46:55 am Pyun YongHyeon wrote:
>  > > yongari     2008-08-22 06:46:55 UTC
>  > >
>  > >   FreeBSD src repository
>  > >
>  > >   Modified files:
>  > >     sys/dev/bfe          if_bfe.c if_bfereg.h
>  > >   Log:
>  > >   SVN rev 181994 on 2008-08-22 06:46:55Z by yongari
>  > >
>  > >   Add a new sysctl node 'dev.bfe.N.stats' that shows various MAC
>  > >   counters for Rx/Tx statistics. Various counters in ifnet is also
>  > >   updated with these hardware counters.
>  > >
>  > >   Tested by:      kib, Gleb Kurtsou gleb.kurtsou at gmail dot com
>  > >                   Ulrich Spoerlein uspoerlein at gmail dot com
>  >
>  > I think it's kind of wrong to have sysctl's that print stats in dmesg. 
>  > You can either have a sysctl that returns a string and uses sbuf's (e.g.
>  > vm.phys_free) if you want formatting or even better, you can give each
>  > stat it's own sysctl.  This is more friendly for people to use when they
>  > aren't on the console (e.g. when you ssh into a box).
>
> I fully agree. Spewing lots of message in dmesg would be wong,
> especially on slow serial link. I thought these counters would be
> just used to analyze driver bug or odd driver behavior. It was just
> for debugging.

But sometimes these stats are useful for debugging network problems on 
production machines as well.

> For long time I wanted a architectural way to add these kind of
> counters in ethernet drivers. Adding a sysctl node for each counter
> looked like overkilling at that time and we still don't have a
> generic tool to dump the stats. I'll think about it again.

At work we've actually had instances where we wanted to look at the stats on a 
production box (and rebooting it to add patches would kill the stats).  For 
those I find the per-stat sysctls useful.

-- 
John Baldwin



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