Ticket #148 (closed task)
Opened 7 years ago
Alarm thresholds in 'sensors' (Examined/Solved - lm_sensors 2.1.2 Linux 2.2.0)
|Reported by:||contact||Owned by:||somebody|
In 'sensors', the thresholds to display 'ALARM' are set in the sensors.conf file. (in1_min, in1_max, etc.) But the 'min' and 'max' displayed by 'sensors' are NOT set by the sensors.conf file - they are read from /proc values. So if I want to have 'sensors' display min and max values I have to convert them and write new values to /proc. For example, at system startup: echo 2.13 2.27 > /proc/sys/dev/sensors/w83781d-isa-0290/in1 and in sensors.conf: set in1_min 2.2*0.97 set in1_max 2.2*1.03 Is there an easier way to do this? I couldn't find documentation on this and it is certainly not obvious. Also, if you echo three decimal places to set a min and max value it doesn't work right. echo 2.133 2.277 > in1 cat in1 2.13 3.00 2.25 --- Documentation is still a bit scarce. This will become better; we are sorry it is not complete yet. What you are looking for is the '-s' flag of the sensors program. You could put the following in sensors.conf:
set in1_min 2.2*0.97 set in1_max 2.2*1.03
and instead of catting anything to /proc/sys/dev/sensors/w83781d-isa-0290/in1, you call (as root, probably from one of your rc files) 'sensors -s'. You can check this worked by examining the output of 'sensors' again (if it does not, mail us a bug report :-) ). By using the 'sensors' program and the config file, you should never have to examine the /proc files again!
Additional note: When setting limits 'by hand' using echo, put the parameters in quotes: echo "1 2" > in1 and not, echo 1 2 > in1 For some reason, some shells don't echo the parameters as our software expects unless they are all in quotes. Phil