From owner-freebsd-current Sat Jan 4 12:51: 7 2003 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C9D9937B405 for ; Sat, 4 Jan 2003 12:50:56 -0800 (PST) Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.86.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id 78E1243ED4 for ; Sat, 4 Jan 2003 12:50:55 -0800 (PST) (envelope-from phk@freebsd.org) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.12.6/8.12.6) with ESMTP id h04KolRu003194; Sat, 4 Jan 2003 21:50:47 +0100 (CET) (envelope-from phk@freebsd.org) To: Trent Nelson Cc: freebsd-current@freebsd.org Subject: Re: systat -ifstat patch From: phk@freebsd.org In-Reply-To: Your message of "Sat, 04 Jan 2003 10:19:50 CST." <20030104161950.GA56080@arpa.com> Date: Sat, 04 Jan 2003 21:50:47 +0100 Message-ID: <3193.1041713447@critter.freebsd.dk> Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In message <20030104161950.GA56080@arpa.com>, Trent Nelson writes: > > I've written an extension to systat that allows you to monitor the > traffic through active network interfaces on the system, akin to > netstat -I. I've attached the patch to this e-mail, but it can also be > found at http://arpa.com/~trent/systat-ifstat-current.patch[.tar.gz]. > > All comments on code, style or functionality are welcome. This looks pretty useful. As far as I can see you have some genuine fixes in there: >diff -uBN /shared/data/trent/src/src/usr.bin/systat/cmds.c /usr/src/usr.bin/systat/cmds.c >--- /shared/data/trent/src/src/usr.bin/systat/cmds.c Wed Dec 12 00:13:37 2001 >+++ /usr/src/usr.bin/systat/cmds.c Sat Jan 4 14:11:32 2003 >@@ -119,6 +119,7 @@ > goto done; > alarm(0); > (*curcmd->c_close)(wnd); >+ curcmd->c_flags &= ~CF_INIT; > wnd = (*p->c_open)(); > if (wnd == 0) { > error("Couldn't open new display"); We should probably commit them in a separate commit first. >diff -uBN /shared/data/trent/src/src/usr.bin/systat/convtbl.c /usr/src/usr.bin/systat/convtbl.c >--- /shared/data/trent/src/src/usr.bin/systat/convtbl.c Thu Jan 1 01:00:00 1970 >+++ /usr/src/usr.bin/systat/convtbl.c Sat Jan 4 00:13:11 2003 >@@ -0,0 +1,98 @@ This is only used for the ifstat page, right ? Should/Could bits of the other code use it as well ? >diff -uBN /shared/data/trent/src/src/usr.bin/systat/systat.1 /usr/src/usr.bin/systat/systat.1 >--- /shared/data/trent/src/src/usr.bin/systat/systat.1 Fri Dec 27 12:15:35 2002 >+++ /usr/src/usr.bin/systat/systat.1 Sat Jan 4 14:31:06 2003 >@@ -30,7 +30,7 @@ > .\" SUCH DAMAGE. > .\" > .\" @(#)systat.1 8.2 (Berkeley) 12/30/93 >-.\" $FreeBSD: src/usr.bin/systat/systat.1,v 1.36 2002/12/27 12:15:35 schweikh Exp $ >+.\" $FreeBSD: src/usr.bin/systat/systat.1,v 1.23.2.9 2002/12/29 16:35:40 schweikh Exp $ This looks worrisome to me, and some of the deltas look more so: >@@ -500,8 +522,8 @@ > .Xr iostat 8 , > .Xr vmstat 8 > .Sh FILES >-.Bl -tag -width /boot/kernel/kernel -compact >-.It Pa /boot/kernel/kernel >+.Bl -tag -width /etc/networks -compact >+.It Pa /kernel > For the namelist. > .It Pa /dev/kmem > For information in main memory. Otherwise I think it looks good. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message