From owner-freebsd-hackers Mon Sep 30 04:26:39 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id DAA17240 for hackers-outgoing; Mon, 30 Sep 1996 03:48:38 -0700 (PDT) Received: from who.cdrom.com (who.cdrom.com [204.216.27.3]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id DAA17140; Mon, 30 Sep 1996 03:48:30 -0700 (PDT) Received: from covina.lightside.com (covina.lightside.com [207.67.176.1]) by who.cdrom.com (8.7.5/8.6.11) with ESMTP id XAA19236 ; Sun, 29 Sep 1996 23:06:54 -0700 (PDT) Received: from localhost (jehamby@localhost) by covina.lightside.com (8.7.6/8.7.3) with SMTP id XAA15753; Sun, 29 Sep 1996 23:05:34 -0700 (PDT) Date: Sun, 29 Sep 1996 23:05:32 -0700 (PDT) From: Jake Hamby To: dyson@FreeBSD.ORG cc: Karl Denninger , chuckr@glue.umd.edu, hackers@FreeBSD.ORG Subject: Re: PS broke again -- what has to be rebuilt to stop this? In-Reply-To: <199609292040.PAA11764@dyson.iquest.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk On Sun, 29 Sep 1996, John S. Dyson wrote: > > No, I well understand that -CURRENT changes. > > > > That's the point of it being "current". > > > > However, if I want to run a new kernel, I shouldn't have to rebuild half > > of the system utilities! > > > I agree that it is a problem (but being honest -- it isn't HALF of > the utilities :-)). I am willing to work with the other architectural > contributors for a good fix. It is also one of my "hot" buttons. > > John Hey, why don't we build on the KernFS we already have? Let's see: hamby1# mount -t kernfs kern /kern # This command always works # (kernfs is an LKM) hamby1# ls /kern bootfile copyright hz pagesize time boottime hostname loadavg physmem version Between /kern/boottime, /kern/time, and /kern/loadavg, you can probably get most of what uptime needs. The rest of the information is not so useful, but I think that the best solution is to take whatever kernel structures the utilities in question need, and make the information available in ASCII-formatted pseudo-files in /kern. Between /kern and /proc (which ps is already using), we _should_ have all the information these utilities need; then they don't need to be poking around in /dev/kmem, and furthermore, don't need to be SGID kmem! By the way, Linux has done this since the beginning (except that everything is in /proc), and therefore a ps from kernel 0.99.x, in spirit at least, will work on the latest 2.0.x kernel. -- Jake