Subject: Re: systat can't read /dev/ksyms
To: walt <email@example.com>
From: Jaromir Dolecek <jdolecek@NetBSD.org>
Date: 08/03/2003 14:21:22
Okay, there are several issues.
Yes, you indeed absolutely have to have the booted kernel
as file /netbsd if you want the kernel growellers (xosview,
systat etc) to work, and the file must not be gzipped.
The sysinst coredumping was a bug in sysinst code, where
it used some Curses library function before curses context
would be initialized if the initial symbol lookup failed.
This exactly happened if the booted kernel would be gzipped,
or when systat would be run like 'systat -N /netbsd.gz'.
I checked in a fix for this one to -current,
src/usr.bin/systat/main.c rev. 1.34.
> Okay, I found out why systat segfaults, and (probably) why libkvm
> apps like xosview don't work for me.
> systat opens /dev/ksyms okay but gets a ENXIO error when attempting
> to read from it.
> But if I call systat like this it works normally:
> systat -N /usr/obj/sys/arch/i386/compile/MYKERNEL/netbsd
> The systat manpage says "/netbsd" is used by default, but every
> kernel built by build.sh is gzipped and not named "netbsd" so
> I'm not quite sure how this is supposed to work.
If you build kernel, it is named 'netbsd'. The build.sh tools
might rename the final binary something along netbsd-GENERIC.gz, indeed.
But the bootblocks try to boot 'netbsd', then 'netbsd.gz'
then 'onetbsd', 'netbsd.old' etc.
Jaromir Dolecek <jdolecek@NetBSD.org> http://www.NetBSD.cz/
-=- We should be mindful of the potential goal, but as the tantric -=-
-=- Buddhist masters say, ``You may notice during meditation that you -=-
-=- sometimes levitate or glow. Do not let this distract you.'' -=-