From owner-freebsd-hackers Tue Oct 1 01:59:28 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id BAA07734 for hackers-outgoing; Tue, 1 Oct 1996 01:59:28 -0700 (PDT) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id BAA07701; Tue, 1 Oct 1996 01:59:17 -0700 (PDT) Received: (from bde@localhost) by godzilla.zeta.org.au (8.7.6/8.6.9) id SAA20352; Tue, 1 Oct 1996 18:54:46 +1000 Date: Tue, 1 Oct 1996 18:54:46 +1000 From: Bruce Evans Message-Id: <199610010854.SAA20352@godzilla.zeta.org.au> To: dyson@FreeBSD.org, jehamby@lightside.com Subject: Re: PS broke again -- what has to be rebuilt to stop this? Cc: chuckr@glue.umd.edu, hackers@FreeBSD.org, karl@Mcs.Net Sender: owner-hackers@FreeBSD.org X-Loop: FreeBSD.org Precedence: bulk >Hey, why don't we build on the KernFS we already have? Let's see: Because sysctl already does things better than kernfs. >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 sysctl kern.bootfile sysctl kern.boottime [no copyright under sysctl] sysctl kern.hostname sysctl kern.clockrate sysctl vm.loadavg sysctl hw.pagesize sysctl hw.physmem sysctl hw.usermem [no time under sysctl - use gettimeofday()] sysctl kern.vers I think the main advantage of kernfs is that it is more efficient in shell scripts. Running sysctl(8) to fetch a value from the kernel and format it nicely takes a while. Bruce