🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.sun
Article #12489

Re: ps stops working when I reconfigure the kernel

#12489
From: Casper H.S. Dik
Date: Fri, 05 May 1989 22:11
37 lines
2249 bytes
mcvax!gmv.es!jsanchez@uunet.uu.net (Julio Sanchez / GMV) writes:
>X-Sun-Spots-Digest: Volume 7, Issue 238, message 14 of 14
>
>I have been trying to reconfigure a kernel (to install SunLink/DNI) and
>most things go OK except for 'ps' or 'w' that produce a 'segmentation
>fault' and complain about problems in accessing /dev/drum and /dev/kmem.

Ps(1), w(1) and many many other programs that tell something about the
status of the system look in /dev/kmem and /dev/drum. They look for the
values of certain items in the kernel's address space. To find out what's
where they use the kernel's name list. (see nlist(3)).

To get that namelist, those programs open /vmunix, expecting it to be the
current kernel. If that kernel isn't the current one, ps will show random
data and will derefence random pointers, sometimes causing segmentation
faults.

So, I suspect you have named your kernel something like newvmunix or
vmunix.generic (anything but /vmunix).

All you have to do is mv /<current-vmunix> /vmunix.

Alternatively, you can specify the new kernel on the command line of some
of the utilities that use it (but not all, this works with ps(1) and
netstat(8), but not with w(1), iostat(8) and vmstat(8))

Similar effect happen when you strip(1) the kernel, but in that case ps
would say something like: `/vmunix: no namelist.'

--cd

Casper H.S. Dik
University of Amsterdam     |		      casper@uva.uucp
The Netherlands             |                 ...!uunet!mcvax!uva!casper

[[ Alternatively, you could link "/vmunix" to the kernel that you just
booted with:  "mv /vmunix /vmunix.old; ln /<current-unix> /vmunix"  --wnl ]]
Technical Details
Message-ID: <699@uva.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!uw-beaver!rice!sun-spots-request
References: <8903310856.AA04165@eonwe.gmv.es>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!uw-beaver!rice!sun-spots-request
From: casper@uva.UUCP (Casper H.S. Dik)
Newsgroups: comp.sys.sun
Subject: Re: ps stops working when I reconfigure the kernel
Keywords: SunOS
Message-ID: <699@uva.UUCP>
Date: 5 May 89 22:11:22 GMT
References: <8903310856.AA04165@eonwe.gmv.es>
Sender: usenet@rice.edu
Organization: Faculteit Wiskunde & Informatica, Universiteit van Amsterdam
Lines: 37
Approved: Sun-Spots@rice.edu
Original-Date: 22 Apr 89 15:50:09 GMT
X-Sun-Spots-Digest: Volume 7, Issue 268, message 11 of 21