From owner-freebsd-hackers Thu Nov 22 3: 8:30 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from mailhub.fokus.gmd.de (mailhub.fokus.gmd.de [193.174.154.14]) by hub.freebsd.org (Postfix) with ESMTP id B2AE737B405 for ; Thu, 22 Nov 2001 03:08:26 -0800 (PST) Received: from beagle (beagle [193.175.132.100]) by mailhub.fokus.gmd.de (8.11.6/8.11.6) with ESMTP id fAMB8Gr21869; Thu, 22 Nov 2001 12:08:16 +0100 (MET) Date: Thu, 22 Nov 2001 12:08:16 +0100 (CET) From: Harti Brandt To: Mike Meyer Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: sysctls for hardware monitoring? In-Reply-To: <15356.54999.36663.125374@guru.mired.org> Message-ID: <20011122120233.B2946-100000@beagle.fokus.gmd.de> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Thu, 22 Nov 2001, Mike Meyer wrote: MM>Harti Brandt types: MM>> On Thu, 22 Nov 2001, Mike Meyer wrote: MM>> MM>Linux uses a device driver that's a directory full of files holding MM>> MM>sensor information. That doesn't seem to be the right direction for MM>> MM>FBSD, though. An option that enabled a set of sysctls to collect the MM>> MM>information seemed to be more approrpiate. MM>> MM>Comments? Suggestions? Brickbats? MM>> MM>> What's bad about using files? Just to be different? MM> MM>Other than having to deal with devfs in -current vs. -stable, nothing MM>in particular. I'm just looking at the trend for doing things in MM>-stable, which is to make read-only data from in the kernel available MM>via sysctls. For example, where Linux has /proc/net/dev and MM>/proc/net/route, FreeBSD uses a sysctl to get the data. It's just annoying to need a special program to get at the values. For some parts of the MIB, like the interface MIB, even sysctl doesn't help - you need to write a program to look at these. I still think, its easier to read the fan speed by cat(1)-ing a file, than to fire up a special program for this. MM>>Isn't it easier to select, poll, kqueue, what ever on files than on sysctls? MM> MM>True, but none of the things you've named are useful for these MM>hardware monitors. The only useful thing you can do is read the MM>current value. Not sure. You could have a file, that gives you events, like 'CPU to hot' or so. The the user space program wouldn't need to poll the values. harti -- harti brandt, http://www.fokus.gmd.de/research/cc/cats/employees/hartmut.brandt/private brandt@fokus.fhg.de To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message