Subject: Re: ps problem
To: Bevis Peters <bevis@apg.ph.ucl.ac.uk>
From: Jasper Wallace <jasper@ivision.co.uk>
List: port-arm32
Date: 04/29/1997 12:56:56
On Tue, 29 Apr 1997, Bevis Peters wrote:

> So, my latest RBSD is all working, even to a VT320 terminal on our roof so
> I can sunbathe and work :). However, 'ps' (and 'w') give a 'proc size mismatch'
> error. Now I have the latest VOY kernel in /netbsd and in the bootloader on
> my RPC600 machine. I've looked in the archives a bit but can't find anything
> on this.

ps, w, top, systat, and one or two other i beleive all read infomation from
the running kernel using kernel virtual memory or kvm - if you look in
/var/run/ there is a file called kvm.bd which tells the vairous programs
that use the kvm interface where to get the information in the kernels
memory. if this file gets out of date with the kernel your running
(sometimes caused by the kernel you booted with and /netbsd being different)
then ps and friends don't work... to fix this:

make sure /netbsd and the kernel you booted from are identical

as root do:
rm -f /var/db/kvm.db
kvm_mkdb

the other (and much more lickly) thing that can cause this problem is the
structures inside the kernel changing with newer versions of the kernel - to
fix this you (or someone) needs to compile new versions of the kvm librarys,
and ps, w, top etc... these new versions will understand the changes and
work.

(
the sequence iirc is something like: (assuming you have the complete source)
# new version of make
cd /usr/src/usr.bin/make && make depend all install
# newer versions of the system makefiles
cd /usr/src/share/mk && make all install
# get new include files from the kernel
cd /usr/src/sys && make include 
# arm32 uses libkvm.old (still??)
cd /usr/src/lib/libkvm.old && make depend all include install 
cd /usr/src/bin/ps && make depend all install
cd /usr/src/bin/w && make depend all install
etc...
the first two items are probably not needed (and may be in the wrong order)
)

the problem with doing this is that the kvm structs change on a regular
basis - i can do you versions of ps etc from late febuary ish which is when
i stopped compiling new kernels (i don't know the date of the latest voyager
kernel) or i'm considering starting to track -current again and then will be
able to do you the latest versions or ps etc, wich again depending on the
date of your voyager kernel may not be what you want...


-- 
I've got a
		 *Universal Turing Machine*
					      and I'm not afraid to use it
(Opinions!=OtherPeoples)