ps stops working when I reconfigure the kernel

Casper H.S. Dik casper at uva.UUCP
Sat May 6 08:11:22 AEST 1989


mcvax!gmv.es!jsanchez at 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 at 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 ]]



More information about the Comp.sys.sun mailing list