From: Jean Delvare <khali@linux-fr.org>
To: lm-sensors@vger.kernel.org
Subject: [lm-sensors] Improvements to fancontrol
Date: Sun, 10 Jun 2007 12:51:00 +0000 [thread overview]
Message-ID: <20070610145100.73595707@hyperion.delvare> (raw)
Hi all,
I made some improvements to our fancontrol script today. From the SVN logs:
* Use let for arithmetic evaluation. Patch taken from the Suse package.
* Kill old commented-out code.
* No longer depend on grep. We already depend on egrep so let's use it
everywhere.
* Don't depend on awk to compute the target PWM value. Bash has an arithmetic
expression evaluation engine which does the job just fine.
* Use read instead of cat to read the sensor values. read is built-in, so
it's cheaper.
* When sysfs is used (2.6 kernel), do not postproces the sensor value reads
with cut, as it is not needed.
* Update the dependency list.
Testers are welcome. I also plan to add support for defining minimum
and maximum PWM values other than 0 and 255 when the measured
temperature is out of the interpolation range.
One interesting thing is that fancontrol now only calls one external
program (sleep) for each iteration when using a 2.6 kernel. Beforehand,
it was calling up to 10 external programs (3 cat, 5 cut, 1 awk, 1
sleep) for each iteration. The number of external programs being called
was one of the reason for reimplementing fancontrol in perl. Now that
the bash script behaves better, my feeling is that the perl script is
no longer needed, and I'd like to get rid of it in lm-sensors 3.0.0, to
lower our maintenance workload. Does anyone have a strong opinion
against this decision?
--
Jean Delvare
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
reply other threads:[~2007-06-10 12:51 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20070610145100.73595707@hyperion.delvare \
--to=khali@linux-fr.org \
--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.