Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 01 Mar 2001 09:13:39 -0500
From:      Michael Sinz <msinz@wgate.com>
To:        Dag-Erling Smorgrav <des@ofug.org>
Cc:        Bruce Evans <bde@zeta.org.au>, "Duane H. Hesser" <dhh@androcles.com>, Randell Jesup <rjesup@wgate.com>, "(Bruce Bauman)" <bbauman@wgate.com>, Alfred Perlstein <bright@wintelcom.net>, arch@FreeBSD.ORG
Subject:   Re: ELF and diskless boot
Message-ID:  <3A9E5913.A2815557@wgate.com>
References:  <Pine.BSF.4.21.0103011452140.1021-100000@besplex.bde.org> <3A9E4990.ACE5EF50@wgate.com> <xzpsnkx62ru.fsf@flood.ping.uio.no>

next in thread | previous in thread | raw e-mail | index | archive | help
Dag-Erling Smorgrav wrote:
> 
> Michael Sinz <msinz@wgate.com> writes:
> > Plus, there is nothing that states that ps/top/etc can not have access
> > to some public symbol that is the sysctl list when the kernel is dead.
> 
> Please show me how you would do 'sysctl vm.zone' on a dead kernel
> without duplicating the code in sys/vm/vm_zone.c.

Ugh...  not easy...

Again, system debugging (and dead kernel debugging) has a lot of dependancies
on the exact kernel that you are running.  And these types of operations are
thus very tied to internal structures for the specific version of the
kernel.

What does this have to do with commands that are used in normal operation
of the system?

Sometimes it is nice to be able to get a ps of a dead system.  This is a
useful and powerful tool for debugging.  It is also useful to be able to
look at any structure and memory item and examine stack and even CPU
registers.  I have done all of that.

But why would the facilities needed for kernel debugging be what are used
(or required) for normal operation.

Maybe others are different, but I fully expect that 99%+ of the times I
run "ps" or "top" or "vmstat" that I do so on a live system.

All of this is moot in that I solved the problem by having Etherboot
handle the symbols, but the question I keep coming back to is:

	Is this the right way to build a system?

Maybe the answer is yes, but I currently do not feel so.  The exposure of
information for tools that are used during normal operation of the system
should (and must) be better controlled than just having access to the
debug symbols.  In fact, as systems scale to more complex setups (multiple
threads, multiple CPUs, etc) such system structures can not be just looked
at without very careful arbitration (or even communications on non-SMP based
clusters).  The debugging of such systems also gets noticeably more complex
(been there, done that) such that the tools for that end of the process
are usually not the normal operational tools.

It is nice to only have a single tool (such as ps) that works in both
cases, but I do not feel that doing so at the expense of general exposure
of symbols is a good thing.

-- 
Michael Sinz ---- Worldgate Communications ---- msinz@wgate.com
A master's secrets are only as good as
	the master's ability to explain them to others.

http://www.sinz.org/Michael.Sinz/
Ex-Amiga OS Kernel Engineer, Ex-Scala, Ex-NextBus, Blackdown JDK, WorldGate

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3A9E5913.A2815557>