Skip to contentSkip to conversation

tempx_max_hyst > tempx_max?

lm-sensors shaul Karl 2 participants 5 messages Nov 2, 2008 – Dec 7, 2008

lore
Share & tools
lore

shaul Karl

author
#0 lore raw

etc/sensors3.conf of lm-sensors-3 (1:3.0.2-1+b2) in Debian states that

# Think of tempx_max as 'alarm set' and tempx_max_hyst as 'alarm clear' # thresholds. In most cases the 'max' value should be higher than # the 'max_hyst' value by several degrees.

In what cases would you set the 'max' value equal to the 'max_hyst'
value? Is it pointless for the 'max_hyst' value to be higher than the 'max' value?
I would say that the last statement about tempx_max_hyst > tempx_max
is confusing.

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

#1 lore raw
Quoted 8 lines · shaul Karl

etc/sensors3.conf of lm-sensors-3 (1:3.0.2-1+b2) in Debian states that

# Think of tempx_max as 'alarm set' and tempx_max_hyst as 'alarm clear' # thresholds. In most cases the 'max' value should be higher than # the 'max_hyst' value by several degrees.

In what cases would you set the 'max' value equal to the 'max_hyst'
value?

If you want to disable the hysteresis mechanism.

Quoted 2 lines

Is it pointless for the 'max_hyst' value to be higher than the 'max' value?

Yes it is, and many chips will not even let you do that because internally they store the hysteresis as a delta to the max limit. Other chips will behave as if max_hyst = hyst, and I suspect some may even misbehave, clearing the alarm even though the measurement is above the max limit.

There's one exception though: some chips out there disable the hysteresis mechanism or even change the interrupt behavior when the hysteresis is set to special value 127. There is unfortunately no way for the drivers to expose this property to user-space, so you have to know how if your chip does that.

Quoted 2 lines

I would say that the last statement about tempx_max_hyst > tempx_max
is confusing.

And I would say you did not read this statement carefully. All the value of this statement is in the last 3 words.

Signature · 6 lines
Jean Delvare

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
author
#2 lore raw
In reply to shaul Karl

I suggest the following:

sensors3.conf 2008-11-05 21:49:27.000000000 +0200 renamed from sensors3.conf 2008-11-02 19:06:45.000000000 +0200 +13 -1
@@ -192,7 +192,19 @@
 #
 # Think of tempx_max as 'alarm set' and tempx_max_hyst as 'alarm clear'
 # thresholds. In most cases the 'max' value should be higher than
-# the 'max_hyst' value by several degrees.
+# the 'max_hyst' value by several degrees. Obviously, having them equal
+# disable the hysteresis mechanism. Many chips will not accept the
+# 'max_hyst' value higher than the 'max' value because internally they
+# store the hysteresis as a delta to the max limit. Other chips will
+# behave in this case as if max_hyst = max, and some may even misbehave,
+# clearing the alarm even though the measurement is above the max limit.
+# There's one exception though: some chips out there disable the
+# hysteresis mechanism or even change the interrupt behavior or even
+# change the interrupt behavior when the hysteresis is set to special
+# value 127. Unfortunately, there is no way for the drivers to expose
+# this property to user-space, so you have to know how if your chip
+# does that. Once again, the bottom line is that the 'max' value should
+# be higher than the 'max_hyst' value by several degrees.
 #
 # All the set statements from this file are commented out by default.
 # The reason is that the proper limits are highly system-dependent,
Quoted 45 lines · Jean Delvare

From: Jean Delvare <[email protected]>
Subject: Re: [lm-sensors] tempx_max_hyst > tempx_max?
To: [email protected]
Cc: [email protected]
Date: Wednesday, November 5, 2008, 9:05 PM

Quoted 1 line · shaul Karl

etc/sensors3.conf of lm-sensors-3 (1:3.0.2-1+b2) in

Debian states that

Quoted 2 lines

# Think of tempx_max as 'alarm set' and

tempx_max_hyst as 'alarm clear'

Quoted 1 line
    # thresholds. In most cases the 'max'

value should be higher than

Quoted 3 lines
    # the 'max_hyst' value by several degrees.

In what cases would you set the 'max' value

equal to the 'max_hyst'

Quoted 1 line

value?

If you want to disable the hysteresis mechanism.

Quoted 1 line

Is it pointless for the 'max_hyst' value to be

higher than the

Quoted 1 line

'max' value?

Yes it is, and many chips will not even let you do that because
internally they store the hysteresis as a delta to the max limit. Other
chips will behave as if max_hyst = hyst, and I suspect some may even
misbehave, clearing the alarm even though the measurement is above the
max limit.

There's one exception though: some chips out there disable the
hysteresis mechanism or even change the interrupt behavior when the
hysteresis is set to special value 127. There is unfortunately no way
for the drivers to expose this property to user-space, so you have to
know how if your chip does that.

Quoted 10 lines
Quoted 1 line

I would say that the last statement about

tempx_max_hyst > tempx_max

Quoted 1 line

is confusing.

And I would say you did not read this statement carefully. All the
value of this statement is in the last 3 words.

Signature · 1 line
Jean Delvare

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

#3 lore raw
In reply to shaul Karl
Quoted 15 lines · shaul Karl

I suggest the following:

sensors3.conf 2008-11-05 21:49:27.000000000 +0200 renamed from sensors3.conf 2008-11-02 19:06:45.000000000 +0200 +6 -1
@@ -192,7 +192,19 @@
 #
 # Think of tempx_max as 'alarm set' and tempx_max_hyst as 'alarm clear'
 # thresholds. In most cases the 'max' value should be higher than
-# the 'max_hyst' value by several degrees.
+# the 'max_hyst' value by several degrees. Obviously, having them equal
+# disable the hysteresis mechanism. Many chips will not accept the
+# 'max_hyst' value higher than the 'max' value because internally they
+# store the hysteresis as a delta to the max limit. Other chips will
+# behave in this case as if max_hyst = max, and some may even misbehave,
+# clearing the alarm even though the measurement is above the max limit.

sensors3.conf 2008-11-05 21:49:27.000000000 +0200 line 210

Quoted 10 lines
sensors3.conf 2008-11-05 21:49:27.000000000 +0200 renamed from sensors3.conf 2008-11-02 19:06:45.000000000 +0200 +7 -0
+# There's one exception though: some chips out there disable the
+# hysteresis mechanism or even change the interrupt behavior or even
+# change the interrupt behavior when the hysteresis is set to special
+# value 127. Unfortunately, there is no way for the drivers to expose
+# this property to user-space, so you have to know how if your chip
+# does that. Once again, the bottom line is that the 'max' value should
+# be higher than the 'max_hyst' value by several degrees.
 #
 # All the set statements from this file are commented out by default.
 # The reason is that the proper limits are highly system-dependent,

I don't think it makes a lot of sense to document with that many details something the user shouldn't do in the first place (tempx_max_hyst greater than tempx_max), or an unspecified, chip-specific behavior (special value 127) nor to repeat the same thing twice a dozen lines apart (the 'max' value should be higher than the 'max_hyst' value by several degrees.) So the only added value here is:

"Obviously, having them equal disable the hysteresis mechanism."

I'll add this now. That being said, I still believe that all this documentation should be moved from sensors.conf.eg to sensors.conf.5. Well apparently the manual page was originally a copy of the header comment of sensors.conf.eg, but they have diverged now. It's no good to have to maintain documentation twice.

Signature · 6 lines
Jean Delvare

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
#4 lore raw
In reply to shaul Karl
Quoted 5 lines · Jean Delvare

I'll add this now. That being said, I still believe that all this documentation should be moved from sensors.conf.eg to sensors.conf.5. Well apparently the manual page was originally a copy of the header comment of sensors.conf.eg, but they have diverged now. It's no good to have to maintain documentation twice.

This is done now. I've moved all the documentation from the top of sensors.conf.eg to sensors.conf.5. I've also tried to clarify the documentation as much as I could. The updated man page can be retrieved with:

svn export http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0/lib/sensors.conf.5

Feedback welcome.

Thanks,

Signature · 6 lines
Jean Delvare

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors