From owner-freebsd-current Sat Oct 24 14:27:06 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id OAA09159 for freebsd-current-outgoing; Sat, 24 Oct 1998 14:27:06 -0700 (PDT) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from uni-sb.de (uni-sb.de [134.96.252.33]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id OAA09154 for ; Sat, 24 Oct 1998 14:27:04 -0700 (PDT) (envelope-from rock@cs.uni-sb.de) Received: from cs.uni-sb.de (cs.uni-sb.de [134.96.252.31]) by uni-sb.de (8.9.0/1998052000) with ESMTP id XAA04730; Sat, 24 Oct 1998 23:25:57 +0200 (CEST) Received: from cs.uni-sb.de (acc2-215.telip.uni-sb.de [134.96.112.215]) by cs.uni-sb.de (8.9.0/1998060300) with ESMTP id XAA05918; Sat, 24 Oct 1998 23:25:56 +0200 (CEST) Message-ID: <3632462A.A9A4503A@cs.uni-sb.de> Date: Sat, 24 Oct 1998 23:27:06 +0200 From: Daniel Rock X-Mailer: Mozilla 4.07 [de] (Win98; U) MIME-Version: 1.0 To: Mike Smith CC: current@FreeBSD.ORG Subject: Re: vmstat, nfsstat broken References: <199810241942.MAA05846@dingo.cdrom.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Mike Smith schrieb: > > > vmstat doesn't seem to like ELF kernels. With aout kernels "vmstat -i" > > works, but with ELF ones, I get the following error message: > > vmstat: symbol intrcnt not defined > > After taking a short look at the code, I suspect it may be associated > > with the now missing leading "_" in ELF symbols, but I'm not sure. > > It's odd that intrcnt isn't found, but eintrcnt is. If you use 'nm' on > your kernel, is it present as 'intrcnt' or '_intrcnt'? The problem isn't the leading "_", but: The variables intrnames, eintrname, intrcnt, eintrcnt from the namelist have the type N_UNDF associated, although they have the right value. If I just ignore n_type, I get the right output even on ELF kernels: *** vmstat.c.orig Sat Oct 24 23:23:27 1998 --- vmstat.c Sat Oct 24 23:23:45 1998 *************** *** 916,922 **** { char *sym; ! if (namelist[nlx].n_type == 0 || namelist[nlx].n_value == 0) { sym = namelist[nlx].n_name; if (*sym == '_') ++sym; --- 916,922 ---- { char *sym; ! if (namelist[nlx].n_value == 0) { sym = namelist[nlx].n_name; if (*sym == '_') ++sym; Daniel To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message