From owner-cvs-src@FreeBSD.ORG Sat Aug 23 03:32:40 2008 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0F740106566B; Sat, 23 Aug 2008 03:32:40 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 7DE428FC14; Sat, 23 Aug 2008 03:32:39 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from zion.baldwin.cx (zion.baldwin.cx [IPv6:2001:470:1f11:75:2a0:d2ff:fe18:8b38]) (authenticated bits=0) by server.baldwin.cx (8.14.2/8.14.2) with ESMTP id m7N3WFux010991; Fri, 22 Aug 2008 23:32:33 -0400 (EDT) (envelope-from jhb@freebsd.org) From: John Baldwin To: pyunyh@gmail.com Date: Fri, 22 Aug 2008 22:52:22 -0400 User-Agent: KMail/1.9.7 References: <200808220647.m7M6lAeL097786@repoman.freebsd.org> <200808221420.28017.jhb@freebsd.org> <20080823023406.GC9758@cdnetworks.co.kr> In-Reply-To: <20080823023406.GC9758@cdnetworks.co.kr> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200808222252.22668.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [IPv6:2001:470:1f11:75::1]); Fri, 22 Aug 2008 23:32:33 -0400 (EDT) X-Virus-Scanned: ClamAV 0.93.1/8076/Fri Aug 22 18:15:54 2008 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=4.2 tests=AWL,BAYES_00,NO_RELAYS autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: cvs-src@freebsd.org, src-committers@freebsd.org, cvs-all@freebsd.org, Pyun YongHyeon Subject: Re: cvs commit: src/sys/dev/bfe if_bfe.c if_bfereg.h X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Aug 2008 03:32:40 -0000 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