suve

awful: function: sysinfo-thermal

Declaration

float :sysinfo-thermal ( int $ZONEID )

Summary

:!: Available only on Linux.

Returns the temperature indicated by the sensor at given thermal zone, in Celcius degrees. Zones are numbered starting from 0. If ZONEID is omitted, defaults to 0. If zone is not present, or an error is encountered, returns 0.0.

Values are read by accessing /sys/class/thermal/thermal_zone{ZONEID}/temp.

Example

# Check CPU temperature.
!if :ge (:sysinfo-thermal) f70
    :writeln s'Good heavens, I think we might be overheating!'
    !fi

wikipage modified on 2014/0601/2317