From owner-freebsd-arch Thu Mar 1 6:14:46 2001 Delivered-To: freebsd-arch@freebsd.org Received: from mail.wgate.com (mail.wgate.com [38.219.83.4]) by hub.freebsd.org (Postfix) with ESMTP id 1201B37B718 for ; Thu, 1 Mar 2001 06:14:43 -0800 (PST) (envelope-from msinz@wgate.com) Received: from sinz.eng.tvol.net ([10.32.2.99]) by mail.wgate.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2653.13) id 152C7NCY; Thu, 1 Mar 2001 09:14:53 -0500 Received: from wgate.com (localhost [127.0.0.1]) by sinz.eng.tvol.net (8.11.1/8.11.1) with ESMTP id f21EDdk48360; Thu, 1 Mar 2001 09:13:58 -0500 (EST) (envelope-from msinz@wgate.com) Message-ID: <3A9E5913.A2815557@wgate.com> Date: Thu, 01 Mar 2001 09:13:39 -0500 From: Michael Sinz Organization: WorldGate Communications Inc. X-Mailer: Mozilla 4.76 [en] (X11; U; FreeBSD 4.2-STABLE i386) X-Accept-Language: en MIME-Version: 1.0 To: Dag-Erling Smorgrav Cc: Bruce Evans , "Duane H. Hesser" , Randell Jesup , "(Bruce Bauman)" , Alfred Perlstein , arch@FreeBSD.ORG Subject: Re: ELF and diskless boot References: <3A9E4990.ACE5EF50@wgate.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Dag-Erling Smorgrav wrote: > > Michael Sinz 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