From owner-freebsd-arch@FreeBSD.ORG Thu Oct 18 11:17:02 2007 Return-Path: Delivered-To: freebsd-arch@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7030C16A417; Thu, 18 Oct 2007 11:17:02 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.freebsd.org (Postfix) with ESMTP id 49B1B13C455; Thu, 18 Oct 2007 11:17:02 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [209.31.154.41]) by cyrus.watson.org (Postfix) with ESMTP id D351C46DFD; Thu, 18 Oct 2007 07:17:01 -0400 (EDT) Date: Thu, 18 Oct 2007 12:17:01 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Poul-Henning Kamp In-Reply-To: <55408.1192704998@critter.freebsd.dk> Message-ID: <20071018120730.N60783@fledge.watson.org> References: <55408.1192704998@critter.freebsd.dk> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Max Laier , "Constantine A. Murenin" , Julian Elischer , freebsd-arch@FreeBSD.org Subject: Re: sensors fun.. X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Oct 2007 11:17:02 -0000 On Thu, 18 Oct 2007, Poul-Henning Kamp wrote: > In message <20071018113431.K60783@fledge.watson.org>, Robert Watson writes: >> On Wed, 17 Oct 2007, Max Laier wrote: > >> There was a suggestion a few years ago on linux-kernel that procfs should >> be changed to export all data in XML -- on face value, that might be read >> as a rather mean joke, but really, it's quite a sensible suggestion. > > Some years ago, some nutcase argued for exporting kernelstate in XML in an > article on DaemonNews, and who knows, he might even have gotten away with > committing it to some unsuspecting BSD operating system if nobody paid > proper attention to his harebrained scheme. :-P It almost makes one wonder if we shouldn't define a new sysctl data type for structured text data. Mac OS X almost universally stores configuration information in plist files, which means that you can use a generic plist editor to make changes and perform basic syntax checking on configuration files you've never seen before. However, this does range a bit far afield from the thread topic. The basic point I was making is that sysctl offers a more semantically rich and, to be honest, better defined way of interacting with live subsystems than device files do in a generic sense. You can hammer down semantics for device nodes, but the code associated with sysctl is much simpler when the goal is to offer mib-like semantics even in quite simple cases (integer set/put). One of the concerns in this thread that did catch my eye is the notion of providing a sensor framework that ends up forcing us to distinguish control paths from monitoring paths. I dislike ioctl as much as the next guy, but where there's a sensor monitoring fan speed, logically associating the controls for fan speed with that sensor is important. Robert N M Watson Computer Laboratory University of Cambridge > > What was that? He did ? Really ?! > > Well, I can try that... > > $ sysctl -nb kern.geom.confxml | head -10 > > > BDE > > > ad4s4a.bde > 4 > > > > > AUGH!!! :-) > > Poul-Henning > > -- > Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 > phk@FreeBSD.ORG | TCP/IP since RFC 956 > FreeBSD committer | BSD since 4.3-tahoe > Never attribute to malice what can adequately be explained by incompetence. >