From owner-cvs-src@FreeBSD.ORG Fri Jun 18 13:32:48 2004 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 69B9A16A4D2; Fri, 18 Jun 2004 13:32:48 +0000 (GMT) Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0550243D2D; Fri, 18 Jun 2004 13:32:48 +0000 (GMT) (envelope-from robert@fledge.watson.org) Received: from fledge.watson.org (localhost [127.0.0.1]) by fledge.watson.org (8.12.11/8.12.11) with ESMTP id i5IDV7QI071920; Fri, 18 Jun 2004 09:31:07 -0400 (EDT) (envelope-from robert@fledge.watson.org) Received: from localhost (robert@localhost)i5IDV3fO071917; Fri, 18 Jun 2004 09:31:03 -0400 (EDT) (envelope-from robert@fledge.watson.org) Date: Fri, 18 Jun 2004 09:31:02 -0400 (EDT) From: Robert Watson X-Sender: robert@fledge.watson.org To: Mike Silbersack In-Reply-To: <20040618014912.O72823@odysseus.silby.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: src-committers@freebsd.org cc: cvs-src@freebsd.org cc: Alfred Perlstein cc: cvs-all@freebsd.org cc: Ken Smith cc: Max Khon Subject: Re: cvs commit: src/sys/sys mbuf.h src/sys/kern uipc_mbuf.c uipc_syscalls.c src/usr.bin/netstat mbuf.c src/lib/libc/sys sendfile.2 X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 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: Fri, 18 Jun 2004 13:32:48 -0000 On Fri, 18 Jun 2004, Mike Silbersack wrote: > In the case of adding output to netstat -m, what could possibly happen? > Maybe someone's mbuf monitoring script sets a false alarm - the user > logs in to check the situation, finds out that sfbuf output was added, > fixes the script, and life goes on. I actually thinks that our current statistics management model is weak from the perspective of scripting regardless of this specific change. sysctl generally offers a nice back-end way to script retrieval of statistics; however, there are some statistics and post-processed results that aren't available in an easily mechanically parsable form (almost any output from systat, top, netstat, etc) because they're laid out for human consumption, not script consumption. Something I've been thinking about for a bit is that we might consider adding a new flag to netstat (and others) to cause the tools to generate more reasily parseable output. I.e., in mib-like output: test% netstat -mS netstat.mbufs.current: 258 netstat.mbufs.peak: 1248 netstat.mbufs.max: 34176 netstat.mbufs.allocated_to_data: 258 netstat.mbuf_clusters.current: 256 ... This would allow new fields to be inserted easily without disturbing highly usable output. That way we can tweak the human layout forms with impunity to take into account changes in requirements, changes in terminal capabilities, etc, etc. And it would make a lot easier when writing scripts, because it would have predictable parsing without worry about dealing with field truncation, odd hostnames, etc, etc. Robert N M Watson FreeBSD Core Team, TrustedBSD Projects robert@fledge.watson.org Senior Research Scientist, McAfee Research