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, Jeremy C. Reed wrote:

I want to have my system log (and maybe alert me) when it reaches a
certain temperature.

I have:

tx:reed$ dmesg | egrep 'amdtemp|acpitz'
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.

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.

I am looking at "envstat -x" output, example /etc/envsys.conf, envstat(8),
powerd(8) and envsys.conf(5) manual pages.

Can you please share examples of configuring envsys conditions and scripts
(in particular temperature would be helpful)?

Here's an example that I've used for some testing on one of my machines:

amdtemp0 {
        sensor0 {
                critical-min = 10C;
                warning-min  = 15C;
                warning-max  = 50C;
                critical-max = 55C;

Or please point me to any further guides/howtos on using this.

Note I do use powerd with lid_switch on another system.

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.

|   Paul Goyette   | PGP DSS Key fingerprint: |  E-mail addresses:   |
| Customer Service | FA29 0E3B 35AF E8AE 6651 |   |
| Network Engineer | 0786 F758 55DE 53BA 7731 | |

Home | Main Index | Thread Index | Old Index