Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 4 Jan 2003 15:49:13 -0600
From:      Trent Nelson <trent@arpa.com>
To:        phk@freebsd.org
Cc:        freebsd-current@freebsd.org
Subject:   Re: systat -ifstat patch
Message-ID:  <20030104214913.GA11874@arpa.com>
In-Reply-To: <3193.1041713447@critter.freebsd.dk>
References:  <20030104161950.GA56080@arpa.com> <3193.1041713447@critter.freebsd.dk>

next in thread | previous in thread | raw e-mail | index | archive | help

--MGYHOYXEY6WxJCY8
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

On Sat, Jan 04, 2003 at 09:50:47PM +0100, phk@freebsd.org wrote:

> This looks pretty useful.

    Thanks!  I think so, so have most other people I've spoken to.

> As far as I can see you have some genuine fixes in there:
> 
> >--- /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.

    I agree.  That particular bug caused me a lot of grief this morning
    before I tracked it down.  None of the other displays were affected
    'cause they didn't have to allocate any structures dynamically.
    
    I've attached cmds.c.patch to this e-mail.

> >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 ?

    Yup, it's currently only used for the ifstat display.  No other
    displays did automatic scaling so I had to write it from scratch.
    The only possible contender for using this code would be vmstat's
    disk usage stats on the bottom left of the screen -- but I think
    that would just unnecessarily clutter the display more than it
    already is.

    What would be nice is a new diskstat display that is the same as
    ifstat, except you display transfer rates for drives on the system.
    I think a lot of people would find this useful (possibly even more
    so than the ifstat display).  What do you think?


> > .\"	@(#)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:

    Erm.  Eek.  I think I copied the -stable systat.1 into my -current
    sources.  I fixed this in the new patch, which can be found at
    http://arpa.com/~trent.  My bad.

    (``systat-ifstat-current.patch'' also now has the modification to
     cmds.c taken out and placed separately in ``cmds.c.patch''.)

> Otherwise I think it looks good.

    Glad to hear it.

> Poul-Henning Kamp

    Regards,

        Trent.

--MGYHOYXEY6WxJCY8
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="cmds.c.patch"

Index: cmds.c
===================================================================
RCS file: /home/ncvs/src/usr.bin/systat/cmds.c,v
retrieving revision 1.4
diff -u -r1.4 cmds.c
--- cmds.c	12 Dec 2001 00:13:37 -0000	1.4
+++ cmds.c	4 Jan 2003 14:11:32 -0000
@@ -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");

--MGYHOYXEY6WxJCY8--

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




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