[smartmontools-support] [PATCH] RFC: libata: Add hwmon support for SMART temperature sensors

Linus Walleij linus.walleij at linaro.org
Tue Aug 14 23:31:36 CEST 2018


On Mon, Aug 13, 2018 at 6:26 PM Guenter Roeck <linux at roeck-us.net> wrote:

> The goal is to be able to access all environmental values with a single
> command or set of commands, such as the "sensors" command. This command
> depends on libsensors, which currently gets its data exclusively from
> hwmon drivers.
>
> A possible alternative might be to implement some kind of plugin interface
> in libsensors, to let it pull environmental data from other entities besides
> kernel drivers. This would enable uses cases like this (presumably with
> a daemon which would connect to libsensors). Technically this should not
> be too difficult; the biggest challenge might be to find someone with
> enough time to design and implement it.

My experience after working with libnjb, the implementation of the
Media Transfer Protocol that is used to microkernel-ishy from userspace
to communicate with all media players out there would be please just
do it in kernelspace.

The main reason is that I think the kernel should abstract hardware
and present it to userspace in a uniform way. Hwmon is excellent at
this.

The kernel is also awesome and highly performant at doing arbitration
between clients. in this case arbitration between this code and userspace
SMART toools is done by the queue in the block layer, which is
awesome at what it's doing.

We have a loose ideal to let userspace deal with "policy" (it is a bit unclear
what that means) and other SMART usage like disk diagnostics and
self-test etc is definately policy IMO (smartmontools even have a
daemon for it, in the manpage it is stated how to instruct it to ignore
the temperature beacause it "changes too often"), so the temperature
of the hard disk is dubious as "policy", it is more of a fact which we
have a dedicated ABI for.

Just my €0.01
Linus Walleij



More information about the Smartmontools-support mailing list