Re: Porting OpenBSD's sysctl hw.sensors framework to FreeBSD



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.
_______________________________________________
freebsd-arch@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-arch
To unsubscribe, send any mail to "freebsd-arch-unsubscribe@xxxxxxxxxxx"