I have a (very old) computer (with an ASUS A8N-SLI DELUXE motherboard and an AMD Opteron(tm) Processor 180) that I monitor with munin, and the
Vcore Voltage as read by
lm-sensors is always in a
Critical state because the input volt is always below the min threshold. I never bothered much for years, but today I tried to fix that misreporting. However, after several hours of troubleshooting I was unable to address the issue because I cannot change the min/max thresholds that are read-only.
Here are my findings so far:
The Critical state comes because the input Vcore voltage value is outside the min/max values.
sensors -u reports the following:
... atk0110-acpi-0 Adapter: ACPI interface Vcore Voltage: in0_input: 1.104 in0_min: 1.450 in0_max: 1.750 ...
As you can see the
1.45V but the
in0_input is less than min
After reading the documentation of lm-sensors config file (https://linux.die.net/man/5/sensors.conf) I found out that I can correct the min/max values with some proper configuration. So I created a file
/etc/sensors.d/atk0110.conf with the following contents:
chip "atk0110-*" label in0 "Vcore Voltage" set in0_min 1.05
Then I executed
sensors -s (Read the section
Set Statement in the man page for more info) in order for the settings to take effect and boom! I got the following error:
Error: File /etc/sensors.d/atk0110.conf, line 5: Failed to set value atk0110-acpi-0: At least one "set" statement failed
After some Googling I found out that this error occurs because these values are hardcoded in the BIOS and cannot be changed. They are exposed through the sysfs filesystem to the kernel once the module
asus_atk0110 is loaded, and the values are read from the path
/sys/bus/acpi/drivers/ATK0110/ATK0110:00/hwmon/hwmon1/. In particular for
in0_min the value is read from this file:
My second attempt was to try to try the
compute statement in sensors conf file but I soon found out that I cannot just compute the min/max. When one uses the compute statement in sensors.conf file all sub-features of an input are affected by the computation. From the sensors.conf man page:
A compute statement describes how a feature's raw value should be translated to a real-world value, and how a real-world value should be translated back to a raw value again. This is most useful for voltage sensors, because in general sensor chips have a limited range and voltages outside this range must be divided (using resistors) before they can be monitored... ... ... A compute statement applies to all sub-features of the target feature for which it makes sense. ...
That means in my case, all three values,
in0_max will be affected. So if I use something like this in the config:
chip "atk0110-*" label in0 "Vcore Voltage" compute in0 @-0.4,@
what I end up reading is this:
atk0110-acpi-0 Adapter: ACPI interface Vcore Voltage: in0_input: 0.992 in0_min: 1.050 in0_max: 1.350
As you can see all values decreased by 0.4 volts, so again the input value is lower than min and the Critical munin status remains.
Is there any way to soft-tune ONLY the min/max values in lm-sensors if these values are read-only?
Another option would be to try to fix the issue from the munin side if possible, but the source of the problem in this case is lm-sensors, so I believe that's where the problem should be addressed.