Date: Sat, 24 Oct 1998 23:27:06 +0200 From: Daniel Rock <rock@cs.uni-sb.de> To: Mike Smith <mike@smith.net.au> Cc: current@FreeBSD.ORG Subject: Re: vmstat, nfsstat broken Message-ID: <3632462A.A9A4503A@cs.uni-sb.de> References: <199810241942.MAA05846@dingo.cdrom.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3632462A.A9A4503A>
