From owner-freebsd-current Fri Feb 5 20:57:22 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id UAA23761 for freebsd-current-outgoing; Fri, 5 Feb 1999 20:57:22 -0800 (PST) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from mail.cybcon.com (mail.cybcon.com [205.147.64.46]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id UAA23756 for ; Fri, 5 Feb 1999 20:57:21 -0800 (PST) (envelope-from wwoods@cybcon.com) Received: from freebsd.cybcon.com (usr1-12.cybcon.com [205.147.76.13]) by mail.cybcon.com (8.9.0/8.9.0) with ESMTP id UAA01124; Fri, 5 Feb 1999 20:57:13 -0800 (PST) Message-ID: X-Mailer: XFMail 1.3 [p0] on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <199902060450.UAA03021@apollo.backplane.com> Date: Fri, 05 Feb 1999 20:56:40 -0800 (PST) Reply-To: wwoods@cybcon.com From: William Woods To: Matthew Dillon Subject: Re: Top not working in -Current?? Cc: Bruce Evans , current@FreeBSD.ORG Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Ahh.....and exactly how do I use this? On 06-Feb-99 Matthew Dillon wrote: >:And the fix is..... >: >:On 06-Feb-99 Matthew Dillon wrote: >:> >:>: >:>:Bruce >:> >:> Ahhhhhhhhhhh. Easy to fix. >:> >: > > This this patch to /usr/src/lib/libkvm/kvm_getswapinfo.c. Then > recompile libkvm and try top and pstat -s again. > > -Matt > > Matthew Dillon > > > > Index: kvm_getswapinfo.c > =================================================================== > RCS file: /home/ncvs/src/lib/libkvm/kvm_getswapinfo.c,v > retrieving revision 1.4 > diff -u -r1.4 kvm_getswapinfo.c > --- kvm_getswapinfo.c 1999/01/27 11:29:15 1.4 > +++ kvm_getswapinfo.c 1999/02/06 04:46:48 > @@ -127,10 +127,10 @@ > KGET(NL_NSWDEV, nswdev); > KGET(NL_DMMAX, dmmax); > > - if (kvm_swap_nl[NL_SWAPLIST].n_value) > + if (kvm_swap_nl[NL_SWAPLIST].n_type != N_UNDF) > type = 1; > > - if (kvm_swap_nl[NL_SWAPBLIST].n_value) > + if (kvm_swap_nl[NL_SWAPBLIST].n_type != N_UNDF) > type = 2; > > /* > @@ -406,6 +406,13 @@ > struct blist blcopy = { 0 }; > > KGET(NL_SWAPBLIST, swapblist); > + > + if (swapblist == NULL) { > + if (flags & SWIF_DUMP_TREE) > + printf("radix tree: NULL - no swap in system\n"); > + return; > + } > + > KGET2(swapblist, &blcopy, sizeof(blcopy), "*swapblist"); > > if (flags & SWIF_DUMP_TREE) { ---------------------------------- E-Mail: William Woods Date: 05-Feb-99 / Time: 20:56:18 FreeBSD 4.0 -Current ---------------------------------- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message