Date: Tue, 10 Jul 2007 18:23:28 -0400 From: "Constantine A. Murenin" <cnst@FreeBSD.org> To: Poul-Henning Kamp <phk@phk.freebsd.dk> Cc: Rui Paulo <rpaulo@fnop.net>, Shteryana Shopova <syrinx@FreeBSD.org>, "Constantine A. Murenin" <cnst@FreeBSD.org>, freebsd-arch@FreeBSD.org Subject: Re: Porting OpenBSD's sysctl hw.sensors framework to FreeBSD Message-ID: <469406E0.3090206@FreeBSD.org> In-Reply-To: <53466.1184103823@critter.freebsd.dk> References: <53466.1184103823@critter.freebsd.dk>
next in thread | previous in thread | raw e-mail | index | archive | help
On 10/07/2007 17:43, Poul-Henning Kamp wrote: > A number of observations: > > The main problem about hardware monitoring is the lack of a name-space. > > The OpenBSD sysctl doesn't get anywhere close to providing that. There is no lack in namespace, specifically after the recent redesign of the framework. When you do sysctl(3) calls in OpenBSD 4.1, you specify the type of the sensor that you want to look at in mib[3], and go through a combination of mib[2] (sensor device, i.e. lm0 or ipmi0) and mib[4] (sensor number of above type on above device) to query all devices and all sensors on all of these devices (mib[0] = CTL_HW; mib[1] = HW_SENSORS;). You can be 100% sure that every sensor returned with these calls is a sensor of type specified in mib[3]. Each sensor type has a well-defined unit and other properties. String descriptions are entirely optional, predefined sensor types is all that matters. Range for mib[4] is provided in the sensordev datastructure that can be accessed when mib[3] and mib[4] are omitted. How do you see this as a lack of a namespace? Cheers, Constantine.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?469406E0.3090206>