From: Hans de Goede <hdegoede@redhat.com>
To: lm-sensors@vger.kernel.org
Subject: Re: [lm-sensors] Updated initialization script, testers wanted
Date: Sun, 25 Jan 2009 13:47:30 +0000 [thread overview]
Message-ID: <497C6D72.4040808@redhat.com> (raw)
In-Reply-To: <20090112140236.6b74302e@hyperion.delvare>
Jean Delvare wrote:
<snip>
>
> Frankly I don't see this change as a major pain. If I thought it did, I
> wouldn't be proposing it. Converting the configuration file from the
> old to the new format is done by 19 lines of shell:
>
> CONFIG=/etc/sysconfig/lm_sensors
> test -r "$CONFIG" || exit
>
> unset ${!MODULE_*} $HWMON_MODULES
> . "$CONFIG"
> test -n "$HWMON_MODULES" && exit
>
> for i in ${!MODULE_*} ; do
> eval module=\$$i
> if test -z "$HWMON_MODULES" ; then
> HWMON_MODULES="$module"
> else
> HWMON_MODULES="$HWMON_MODULES $module"
> fi
> done
>
> echo >> "$CONFIG"
> echo "# New configuration format generated by sysconfig-lm_sensors-convert" >> "$CONFIG"
> echo "HWMON_MODULES=\"$HWMON_MODULES\"" >> "$CONFIG"
>
> (Yes, I kept it voluntarily simple, so bus drivers end up in
> HWMON_MODULES, but that's not a problem in practice.)
>
Ok, as discussed on IRC I'll give up my resistance against this change. If you
really want to change this I can live with it.
>> Anyways if we are going to make changes to the format, yes we will need a
>> migration script and, I think we need to think this through more.
>>
>> To be more specific in the future we might / will hopefully get support for
>> hwmon on graphics cards,
>
> We already do to some extent, but there's definitely room for
> improvement.
>
>> (...) then hopefully everything needed will autoload
>
> Really? I agree for bus drivers, but this seems difficult for hwmon
> chip drivers. Do you have some ideas that you didn't share with us yet?
>
Well I hope that for graphiccards, the drm / modesetting driver will also
(probe for?) and instantiate any known to be (sometimes) present i2c sensors.
>> (...) but we
>> might need entries in /etc/sysconfig/lm_sensors, so I'm thinking that it would
>> be good to have separate lines for things like motherboard sensors, gpu sensors
>> and harddisk sensors. This will make it easier for both manual editing as for
>> tools for (automatic) configuration.
>
> My initial goal was to make the configuration file more simple, not
> more complex ;) The main reason why I wanted to split bus drivers and
> hardware monitoring chip drivers is that lm_sensors should be
> considered not configured as long as no hardware monitoring drivers are
> listed. The fact that this will make things a little clearer to the
> users is only a side benefit. Oh, and in a few cases, it is more
> efficient to load the bus drivers first.
>
> I don't see much value in splitting the variables further.
>
> Bus drivers will almost always auto-load these days, so these variables
> will almost always be empty. And the trend for graphics adapter is to
> expose I2C buses from the graphics driver itself, so you aren't loading
> the bus drivers just for lm-sensors.
>
> If we ever have a kernel driver for hard disk temperatures (that would
> be nice!) then I suspect it will be the same driver for all disks, and
> hopefully it will auto-load.
>
> This leaves us with the hardware monitoring chips themselves. Given
> that it is possible that the same driver is used for the motherboard
> and for the graphics adapter, how would you split them? Sure, you could
> list the module twice, but that's not exactly efficient.
>
> What benefits do you see in splitting the variables that way?
>
Oneday I hope we have a tool which will generate and /etc/sensors.conf and
/etc/sysconfig/lm_sensors based on dmi info and a database, then it would be
good to have separate line in /etc/sysconfig/lm_sensors, for sensors located on
the motherboard and sensors located on for example a graphic card, so that that
tool then can only mangle the motherboard lines, without touching any
(potentially manually added) other line.
Anyways I've tested your init scripts modifications, and there is one bug, the
line:
for $module in $BUS_MODULES $HWMON_MODULES ; do
Should be
for module in $BUS_MODULES $HWMON_MODULES ; do
IOW $module -> module, this needs to be fixed in *2* places.
Regards,
Hans
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
next prev parent reply other threads:[~2009-01-25 13:47 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-12 13:02 [lm-sensors] Updated initialization script, testers wanted Jean Delvare
2009-01-13 8:02 ` Hans de Goede
2009-01-13 11:11 ` Jean Delvare
2009-01-13 18:45 ` Hans de Goede
2009-01-14 14:28 ` Jean Delvare
2009-01-25 1:28 ` Volker Kuhlmann
2009-01-25 13:47 ` Hans de Goede [this message]
2009-01-26 14:24 ` Jean Delvare
2009-02-02 13:27 ` Hans de Goede
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=497C6D72.4040808@redhat.com \
--to=hdegoede@redhat.com \
--cc=lm-sensors@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.