All of lore.kernel.org
 help / color / mirror / Atom feed
* [lm-sensors] Fancontrol script improvement
@ 2010-04-12 16:52 Martin Vool
  2010-04-12 17:09 ` Ioan Rusan
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Martin Vool @ 2010-04-12 16:52 UTC (permalink / raw)
  To: lm-sensors

Hello,

i am writing to you because i want to ask you what do you think of my idea.
Currently i can assign only one temperature sensor to a fan. In my
setup i need to monitor 2 sensors and set the fan speed accordingly to
a single fan.

It should not be very complicated to implement this, and implement it
so that the old configuration is not deprecated, for example:

...
FCTEMPS=hwmon0/device/pwm1=hwmon0/device/temp3_input:hwmon0/device/temp1_input
 hwmon0/device/pwm2=hwmon0/device/temp2_input
MINTEMP=hwmon0/device/pwm1E:50  hwmon0/device/pwm2@
MAXTEMP=hwmon0/device/pwm1U:60  hwmon0/device/pwm2U
...
or
...
FCTEMPS=hwmon0/device/pwm1=hwmon0/device/temp3_input
hwmon0/device/pwm1=hwmon0/device/temp1_input
hwmon0/device/pwm2=hwmon0/device/temp2_input
MINTEMP=hwmon0/device/pwm1E hwmon0/device/pwm1P  hwmon0/device/pwm2@
MAXTEMP=hwmon0/device/pwm1U hwmon0/device/pwm1`  hwmon0/device/pwm2U


i personally would prefer the first, since it is more clear on what is going on.

When the script calculates the speeds it simply has to look what is
the highest RPM required for the monitored sensor.

Since i am not used to program in shellscripts i wanted to know if you
would like to implement this? If not then i would give it a shot, but
the code probably wouldn't be very pretty...

What do you think?


Martin Vool

_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [lm-sensors] Fancontrol script improvement
  2010-04-12 16:52 [lm-sensors] Fancontrol script improvement Martin Vool
@ 2010-04-12 17:09 ` Ioan Rusan
  2010-04-12 18:20 ` Martin Vool
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Ioan Rusan @ 2010-04-12 17:09 UTC (permalink / raw)
  To: lm-sensors

Hello

I am currently ported in C language.
this it will be the next issue.
my ideea was to make something like this (tell me it you like)
input0=temp1_input;min_temp=N;max_temp=N
input1=temp2_input;trigger_temp=N
inputN= temp2_input;trigger_temp=N


Martin Vool wrote:
> Hello,
>
> i am writing to you because i want to ask you what do you think of my idea.
> Currently i can assign only one temperature sensor to a fan. In my
> setup i need to monitor 2 sensors and set the fan speed accordingly to
> a single fan.
>
> It should not be very complicated to implement this, and implement it
> so that the old configuration is not deprecated, for example:
>
> ...
> FCTEMPS=hwmon0/device/pwm1=hwmon0/device/temp3_input:hwmon0/device/temp1_input
>  hwmon0/device/pwm2=hwmon0/device/temp2_input
> MINTEMP=hwmon0/device/pwm1E:50  hwmon0/device/pwm2@
> MAXTEMP=hwmon0/device/pwm1U:60  hwmon0/device/pwm2U
> ...
> or
> ...
> FCTEMPS=hwmon0/device/pwm1=hwmon0/device/temp3_input
> hwmon0/device/pwm1=hwmon0/device/temp1_input
> hwmon0/device/pwm2=hwmon0/device/temp2_input
> MINTEMP=hwmon0/device/pwm1E hwmon0/device/pwm1P  hwmon0/device/pwm2@
> MAXTEMP=hwmon0/device/pwm1U hwmon0/device/pwm1`  hwmon0/device/pwm2U
>
>
> i personally would prefer the first, since it is more clear on what is going on.
>
> When the script calculates the speeds it simply has to look what is
> the highest RPM required for the monitored sensor.
>
> Since i am not used to program in shellscripts i wanted to know if you
> would like to implement this? If not then i would give it a shot, but
> the code probably wouldn't be very pretty...
>
> What do you think?
>
>
> Martin Vool
>
> _______________________________________________
> lm-sensors mailing list
> lm-sensors@lm-sensors.org
> http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
>
>   


_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [lm-sensors] Fancontrol script improvement
  2010-04-12 16:52 [lm-sensors] Fancontrol script improvement Martin Vool
  2010-04-12 17:09 ` Ioan Rusan
@ 2010-04-12 18:20 ` Martin Vool
  2010-04-12 18:38 ` Ioan Rusan
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Martin Vool @ 2010-04-12 18:20 UTC (permalink / raw)
  To: lm-sensors

Hello,

this is also a good idea, but what about the already existsing
configuration files? This method would probably break already
existsing fancontrol configurations?
(i always could write my own python script, but i think the community
prefers shell scripting for compatibility reasons?)

Anyways i thought that just a simple patch by someone who does
shellscripting would be very cool :-)


Martin

On Mon, Apr 12, 2010 at 8:09 PM, Ioan Rusan
<ionica@bolovan.homelinux.com> wrote:
> Hello
>
> I am currently ported in C language.
> this it will be the next issue.
> my ideea was to make something like this (tell me it you like)
> input0=temp1_input;min_temp=N;max_temp=N
> input1=temp2_input;trigger_temp=N
> inputN= temp2_input;trigger_temp=N
>
>
> Martin Vool wrote:
>>
>> Hello,
>>
>> i am writing to you because i want to ask you what do you think of my
>> idea.
>> Currently i can assign only one temperature sensor to a fan. In my
>> setup i need to monitor 2 sensors and set the fan speed accordingly to
>> a single fan.
>>
>> It should not be very complicated to implement this, and implement it
>> so that the old configuration is not deprecated, for example:
>>
>> ...
>>
>> FCTEMPS=hwmon0/device/pwm1=hwmon0/device/temp3_input:hwmon0/device/temp1_input
>>  hwmon0/device/pwm2=hwmon0/device/temp2_input
>> MINTEMP=hwmon0/device/pwm1E:50  hwmon0/device/pwm2@
>> MAXTEMP=hwmon0/device/pwm1U:60  hwmon0/device/pwm2U
>> ...
>> or
>> ...
>> FCTEMPS=hwmon0/device/pwm1=hwmon0/device/temp3_input
>> hwmon0/device/pwm1=hwmon0/device/temp1_input
>> hwmon0/device/pwm2=hwmon0/device/temp2_input
>> MINTEMP=hwmon0/device/pwm1E hwmon0/device/pwm1P  hwmon0/device/pwm2@
>> MAXTEMP=hwmon0/device/pwm1U hwmon0/device/pwm1`  hwmon0/device/pwm2U
>>
>>
>> i personally would prefer the first, since it is more clear on what is
>> going on.
>>
>> When the script calculates the speeds it simply has to look what is
>> the highest RPM required for the monitored sensor.
>>
>> Since i am not used to program in shellscripts i wanted to know if you
>> would like to implement this? If not then i would give it a shot, but
>> the code probably wouldn't be very pretty...
>>
>> What do you think?
>>
>>
>> Martin Vool
>>
>> _______________________________________________
>> lm-sensors mailing list
>> lm-sensors@lm-sensors.org
>> http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
>>
>>
>
>



-- 

Martin Vool
Privaat Disain OÜ
Tel. +372 555 69 474
martin@privaatdisain.ee
www.privaatdisain.ee

_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [lm-sensors] Fancontrol script improvement
  2010-04-12 16:52 [lm-sensors] Fancontrol script improvement Martin Vool
  2010-04-12 17:09 ` Ioan Rusan
  2010-04-12 18:20 ` Martin Vool
@ 2010-04-12 18:38 ` Ioan Rusan
  2010-04-12 18:46 ` Martin Vool
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Ioan Rusan @ 2010-04-12 18:38 UTC (permalink / raw)
  To: lm-sensors

Hello

unfortunately it will break compatibility with current config file.
I decided to rewrite in C for speed and flexibility (I want to make 
fancontrol to read hdd temperature. In my case, sometimes, hard drive is 
getting to hot and need a better ventilation...)
Any way, I will make the version in C. If community want to use 
this...is ok...if not...is ok for me.

current config is look something like this:
SENSOR=1
MIN_TEMPE
MAX_TEMP`
MIN_SPEED=0
TEMP_INPUT=/hwmon/hwmon3/device/temp1_input
OUTPUT_FAN=/hwmon/hwmon3/device/pwm1
INPUT_FAN=/hwmon/hwmon3/device/fan1_input
LINIAR_FAN=1
SENSOR=2
MIN_TEMP5
MAX_TEMPE
MIN_SPEED=0
TEMP_INPUT=/hwmon/hwmon3/device/temp2_input
OUTPUT_FAN=/hwmon/hwmon3/device/pwm2
INPUT_FAN=/hwmon/hwmon3/device/fan2_input
LINIAR_FAN=1


Martin Vool wrote:
> Hello,
>
> this is also a good idea, but what about the already existsing
> configuration files? This method would probably break already
> existsing fancontrol configurations?
> (i always could write my own python script, but i think the community
> prefers shell scripting for compatibility reasons?)
>
> Anyways i thought that just a simple patch by someone who does
> shellscripting would be very cool :-)
>
>
> Martin
>
> On Mon, Apr 12, 2010 at 8:09 PM, Ioan Rusan
> <ionica@bolovan.homelinux.com> wrote:
>   
>> Hello
>>
>> I am currently ported in C language.
>> this it will be the next issue.
>> my ideea was to make something like this (tell me it you like)
>> input0=temp1_input;min_temp=N;max_temp=N
>> input1=temp2_input;trigger_temp=N
>> inputN= temp2_input;trigger_temp=N
>>
>>
>> Martin Vool wrote:
>>     
>>> Hello,
>>>
>>> i am writing to you because i want to ask you what do you think of my
>>> idea.
>>> Currently i can assign only one temperature sensor to a fan. In my
>>> setup i need to monitor 2 sensors and set the fan speed accordingly to
>>> a single fan.
>>>
>>> It should not be very complicated to implement this, and implement it
>>> so that the old configuration is not deprecated, for example:
>>>
>>> ...
>>>
>>> FCTEMPS=hwmon0/device/pwm1=hwmon0/device/temp3_input:hwmon0/device/temp1_input
>>>  hwmon0/device/pwm2=hwmon0/device/temp2_input
>>> MINTEMP=hwmon0/device/pwm1E:50  hwmon0/device/pwm2@
>>> MAXTEMP=hwmon0/device/pwm1U:60  hwmon0/device/pwm2U
>>> ...
>>> or
>>> ...
>>> FCTEMPS=hwmon0/device/pwm1=hwmon0/device/temp3_input
>>> hwmon0/device/pwm1=hwmon0/device/temp1_input
>>> hwmon0/device/pwm2=hwmon0/device/temp2_input
>>> MINTEMP=hwmon0/device/pwm1E hwmon0/device/pwm1P  hwmon0/device/pwm2@
>>> MAXTEMP=hwmon0/device/pwm1U hwmon0/device/pwm1`  hwmon0/device/pwm2U
>>>
>>>
>>> i personally would prefer the first, since it is more clear on what is
>>> going on.
>>>
>>> When the script calculates the speeds it simply has to look what is
>>> the highest RPM required for the monitored sensor.
>>>
>>> Since i am not used to program in shellscripts i wanted to know if you
>>> would like to implement this? If not then i would give it a shot, but
>>> the code probably wouldn't be very pretty...
>>>
>>> What do you think?
>>>
>>>
>>> Martin Vool
>>>
>>> _______________________________________________
>>> lm-sensors mailing list
>>> lm-sensors@lm-sensors.org
>>> http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
>>>
>>>
>>>       
>>     
>
>
>
>   


_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [lm-sensors] Fancontrol script improvement
  2010-04-12 16:52 [lm-sensors] Fancontrol script improvement Martin Vool
                   ` (2 preceding siblings ...)
  2010-04-12 18:38 ` Ioan Rusan
@ 2010-04-12 18:46 ` Martin Vool
  2010-04-12 19:07 ` Jean Delvare
  2010-04-12 19:15 ` Ioan Rusan
  5 siblings, 0 replies; 7+ messages in thread
From: Martin Vool @ 2010-04-12 18:46 UTC (permalink / raw)
  To: lm-sensors

Looks fine,

if you can then please send me the source when you have finished it :D
i would like to give it a try.
(if i find time i might create a python rewrite also, and see what i like more)

Martin

On Mon, Apr 12, 2010 at 9:38 PM, Ioan Rusan
<ionica@bolovan.homelinux.com> wrote:
> Hello
>
> unfortunately it will break compatibility with current config file.
> I decided to rewrite in C for speed and flexibility (I want to make
> fancontrol to read hdd temperature. In my case, sometimes, hard drive is
> getting to hot and need a better ventilation...)
> Any way, I will make the version in C. If community want to use this...is
> ok...if not...is ok for me.
>
> current config is look something like this:
> SENSOR=1
> MIN_TEMPE
> MAX_TEMP`
> MIN_SPEED=0
> TEMP_INPUT=/hwmon/hwmon3/device/temp1_input
> OUTPUT_FAN=/hwmon/hwmon3/device/pwm1
> INPUT_FAN=/hwmon/hwmon3/device/fan1_input
> LINIAR_FAN=1
> SENSOR=2
> MIN_TEMP5
> MAX_TEMPE
> MIN_SPEED=0
> TEMP_INPUT=/hwmon/hwmon3/device/temp2_input
> OUTPUT_FAN=/hwmon/hwmon3/device/pwm2
> INPUT_FAN=/hwmon/hwmon3/device/fan2_input
> LINIAR_FAN=1
>
>
> Martin Vool wrote:
>>
>> Hello,
>>
>> this is also a good idea, but what about the already existsing
>> configuration files? This method would probably break already
>> existsing fancontrol configurations?
>> (i always could write my own python script, but i think the community
>> prefers shell scripting for compatibility reasons?)
>>
>> Anyways i thought that just a simple patch by someone who does
>> shellscripting would be very cool :-)
>>
>>
>> Martin
>>
>> On Mon, Apr 12, 2010 at 8:09 PM, Ioan Rusan
>> <ionica@bolovan.homelinux.com> wrote:
>>
>>>
>>> Hello
>>>
>>> I am currently ported in C language.
>>> this it will be the next issue.
>>> my ideea was to make something like this (tell me it you like)
>>> input0=temp1_input;min_temp=N;max_temp=N
>>> input1=temp2_input;trigger_temp=N
>>> inputN= temp2_input;trigger_temp=N
>>>
>>>
>>> Martin Vool wrote:
>>>
>>>>
>>>> Hello,
>>>>
>>>> i am writing to you because i want to ask you what do you think of my
>>>> idea.
>>>> Currently i can assign only one temperature sensor to a fan. In my
>>>> setup i need to monitor 2 sensors and set the fan speed accordingly to
>>>> a single fan.
>>>>
>>>> It should not be very complicated to implement this, and implement it
>>>> so that the old configuration is not deprecated, for example:
>>>>
>>>> ...
>>>>
>>>>
>>>> FCTEMPS=hwmon0/device/pwm1=hwmon0/device/temp3_input:hwmon0/device/temp1_input
>>>>  hwmon0/device/pwm2=hwmon0/device/temp2_input
>>>> MINTEMP=hwmon0/device/pwm1E:50  hwmon0/device/pwm2@
>>>> MAXTEMP=hwmon0/device/pwm1U:60  hwmon0/device/pwm2U
>>>> ...
>>>> or
>>>> ...
>>>> FCTEMPS=hwmon0/device/pwm1=hwmon0/device/temp3_input
>>>> hwmon0/device/pwm1=hwmon0/device/temp1_input
>>>> hwmon0/device/pwm2=hwmon0/device/temp2_input
>>>> MINTEMP=hwmon0/device/pwm1E hwmon0/device/pwm1P
>>>>  hwmon0/device/pwm2@
>>>> MAXTEMP=hwmon0/device/pwm1U hwmon0/device/pwm1`
>>>>  hwmon0/device/pwm2U
>>>>
>>>>
>>>> i personally would prefer the first, since it is more clear on what is
>>>> going on.
>>>>
>>>> When the script calculates the speeds it simply has to look what is
>>>> the highest RPM required for the monitored sensor.
>>>>
>>>> Since i am not used to program in shellscripts i wanted to know if you
>>>> would like to implement this? If not then i would give it a shot, but
>>>> the code probably wouldn't be very pretty...
>>>>
>>>> What do you think?
>>>>
>>>>
>>>> Martin Vool
>>>>
>>>> _______________________________________________
>>>> lm-sensors mailing list
>>>> lm-sensors@lm-sensors.org
>>>> http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>>
>>
>
>



-- 

Martin Vool
Privaat Disain OÜ
Tel. +372 555 69 474
martin@privaatdisain.ee
www.privaatdisain.ee

_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [lm-sensors] Fancontrol script improvement
  2010-04-12 16:52 [lm-sensors] Fancontrol script improvement Martin Vool
                   ` (3 preceding siblings ...)
  2010-04-12 18:46 ` Martin Vool
@ 2010-04-12 19:07 ` Jean Delvare
  2010-04-12 19:15 ` Ioan Rusan
  5 siblings, 0 replies; 7+ messages in thread
From: Jean Delvare @ 2010-04-12 19:07 UTC (permalink / raw)
  To: lm-sensors

Hi Martin,

Please don't top-post.

On Mon, 12 Apr 2010 21:20:12 +0300, Martin Vool wrote:
> this is also a good idea, but what about the already existsing
> configuration files? This method would probably break already
> existsing fancontrol configurations?

I don't think that preserving the fancontrol configuration file format
is a goal we want to follow. In fact, my voice would go to the exact
opposite: the current fancontrol configuration file format has already
grown way further than was originally intended, and we have reached the
understandability limits some times ago already. Anyone willing to do
anything more complex than fancontrol is doing today, should start by
defining a better configuration file format.

> (i always could write my own python script, but i think the community
> prefers shell scripting for compatibility reasons?)

Some may have such preference, but I don't. For the records, there was
a rewrite of fancontrol in perl years ago. It was dismissed not because
it was bad, but because it was redundant (it was basically a perfect
clone of the shell script variant, not taking benefit of the power of
perl.) It aimed at being permanently compatible with the original
script, so the weight of the perl interpreter was hard to justify.

However, we have reached the limits of the current implementation. Not
only the configuration file isn't flexible enough, but more
importantly, the sysfs interface to the chips is used directly, while
using libsensors would be much better. We currently lack the
temperature scaling / offsets, as well as all the labels, that would
make configuration much easier. We also lack permanent device names. So
we really want a new implementation that uses libsensors, and that
means a higher level language than shell scripting. C is the easiest
candidate. python would be just as valid, but you first must write a
python binding to libsensors.

> Anyways i thought that just a simple patch by someone who does
> shellscripting would be very cool :-)

-- 
Jean Delvare

_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [lm-sensors]  Fancontrol script improvement
  2010-04-12 16:52 [lm-sensors] Fancontrol script improvement Martin Vool
                   ` (4 preceding siblings ...)
  2010-04-12 19:07 ` Jean Delvare
@ 2010-04-12 19:15 ` Ioan Rusan
  5 siblings, 0 replies; 7+ messages in thread
From: Ioan Rusan @ 2010-04-12 19:15 UTC (permalink / raw)
  To: lm-sensors

I will send when I will have a good working version (It will take couple 
of days to finish rewriting)
If someone have better ideea about configuration file...please announce me.

_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2010-04-12 19:15 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-04-12 16:52 [lm-sensors] Fancontrol script improvement Martin Vool
2010-04-12 17:09 ` Ioan Rusan
2010-04-12 18:20 ` Martin Vool
2010-04-12 18:38 ` Ioan Rusan
2010-04-12 18:46 ` Martin Vool
2010-04-12 19:07 ` Jean Delvare
2010-04-12 19:15 ` Ioan Rusan

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.