Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: looking for more docs on envstat / envsys.conf



On Tue, 23 Sep 2008, Paul Goyette wrote:

> > acpitz0 at acpi0 (TZCR): active cooling level 1: 41.8C critical 102.0C
> > amdtemp0 at pci0 dev 24 function 3
> > amdtemp0: AMD CPU Temperature Sensors (K8: core rev BH-G1)
> > 
> > tx:reed$ envstat -d acpitz0
> > temperature:     78.000 degC
> > 
> > tx:reed$ envstat -d amdtemp0
> > CPU0 Sensor0:     75.250 degC
> > CPU0 Sensor1:     75.250 degC
> > CPU1 Sensor0:     73.750 degC
> > CPU1 Sensor1:     74.000 degC
> > 
> > I see the /etc/powerd/scripts/sensor_temperature script will log for:
> > normal state entered, critical state entered, dropped below critical
> > limit, critical limit exceeded, dropped below warning limit, and warning
> > limit exceeded.
> > 
> > I have nothing like these logged. I also don't have powerd running.
> 
> You'll need to start powerd, since that is where the sysmon_envsys events get
> delivered.

Understood. Now started:

tx:bind9$ /etc/rc.d/powerd rcvar                                               
# powerd
$powerd=NO
tx:bind9$ echo 'powerd=YES  # 23/Sep/2008 reed -- for temperature sensor' 
| sudo tee -a /etc/rc.conf
powerd=YES  # 23/Sep/2008 reed -- for temperature sensor
tx:bind9$ /etc/rc.d/powerd rcvar                                               
# powerd
$powerd=YES
tx:bind9$ /etc/rc.d/powerd start 
Starting powerd.

> You'll also need to set sensor thresholds.  The driver uses some built-
> values (see the dmesg for details).  It appears that the driver sets the
> FMONCRITOVER flags when appropriate, so if you readch the limit it will
> deliver an event to powerd.  You can also set your own limits to over-
> ride the predefined ones, using envstat.
...

> > By the way, how can I find the critical and other values for my amdtemp0?
> 
> They're in the dmesg output as far as I can tell.

That's the part I am confused about. See my dmesg output above. I am 
wondering how I can know what envstat knows. Such as what is my current 
critical-min, warning-min, warning-max, and critical-max. I now answer 
myself: envstat -x didn't show. But once I loaded with envstat -c 
envsys.conf, then envstat -x did show them. So I guess I didn't have these 
preset on my system. For example (diff of old and new):

        <key>amdtemp0</key>
        <array>
                <dict>
+                       <key>critical-max</key>
+                       <integer>328150000</integer>
+                       <key>critical-min</key>
+                       <integer>283150000</integer>
                        <key>cur-value</key>
-                       <integer>346400000</integer>
+                       <integer>346150000</integer>
                        <key>description</key>
                        <string>CPU0 Sensor0</string>


I am also curious why does envsys.conf use different sensor names than 
envstat -s? For example, why envsys.conf would use "sensor0" while envstat 
-s would use case-sensitive "CPU0 Sensor0"?

And also (from your example), I was wondering how does the critical-min, 
warning-min, warning-max, and critical-max match up with the event names 
sent to the sensor_temperature script. I now found the answer in 
envsys.conf(5) manual page. Why don't they just use the same labels?

Using your amdtemp0 config, I got an error:

envstat: syntax error in line 66

Which is this line for me:

                warning-min  = 15C;

I commented out the warning* properties. And then that worked.

Now I see you had added the warning-min and warning-max alarm levels. 
Thanks! I didn't update current yet since kernels since May 13 don't work. 
But I am now updating userland -- I sure hope that is okay.

So now I have a log entry:

Sep 23 16:40:41 tx reed: /etc/powerd/scripts/sensor_temperature: 
(amdtemp0) critical limit exceeded [CPU0 Sensor0]

It would be useful to see some real values here. But this is fine anyways.

Also in your shared example, I am curious why you have the critical-min 
at a lower temperature than your warning-min.

Thanks again for your explanation -- and also thanks for coding work on 
this.

(I will be documenting my experiences with this, so if anyone has other 
examples to share, please do!)


Home | Main Index | Thread Index | Old Index