Description
The "sensors -s" will load platform specific config (/etc/sensors.d/sensors.conf) first. And then load the default config (/etc/sensors3.conf). But some set statements will rewrite by default config. When use coammand sensors and it will show incorrect value or label.
Steps to reproduce the issue:
- modify /usr/share/sonic/device/x86_64-ingrasys_s9100-r0/sensors.conf and search
chip "w83795adg-*"
- Add test code under
chip "w83795adg-*" as follows:
set in12_min 3.3 * 0.95
set in12_max 3.3 * 1.05
- Save the file and reboot
- Login and execute command
sensors
Describe the results you received:
The 3.3V min and max value still between 3.3 * 0.90 and 3.3 * 1.10
Describe the results you expected:
The 3.3V min value is 3.3 * 0.95 and max value is 3.3 * 1.05
Additional information you deem important (e.g. issue happens only occasionally):
I think this issue is related by this code:
https://github.com/Azure/sonic-buildimage/blob/f49cac086f8421bf5d76a4798c4906700a322a50/dockers/docker-platform-monitor/lm-sensors.sh#L6
We fixed this issue by replace lm-sensors.sh line 6 as follows:
if [ -e /etc/sensors.d/sensors.conf ]; then
/usr/bin/sensors -s -c /etc/sensors.d/sensors.conf > /dev/null 2>&1
else
/usr/bin/sensors -s > /dev/null 2>&1
fi
And this code will avoid rewrite default config.
Description
The "sensors -s" will load platform specific config (/etc/sensors.d/sensors.conf) first. And then load the default config (/etc/sensors3.conf). But some set statements will rewrite by default config. When use coammand
sensorsand it will show incorrect value or label.Steps to reproduce the issue:
chip "w83795adg-*"chip "w83795adg-*"as follows:sensorsDescribe the results you received:
The 3.3V min and max value still between 3.3 * 0.90 and 3.3 * 1.10
Describe the results you expected:
The 3.3V min value is 3.3 * 0.95 and max value is 3.3 * 1.05
Additional information you deem important (e.g. issue happens only occasionally):
I think this issue is related by this code:
https://github.com/Azure/sonic-buildimage/blob/f49cac086f8421bf5d76a4798c4906700a322a50/dockers/docker-platform-monitor/lm-sensors.sh#L6
We fixed this issue by replace lm-sensors.sh line 6 as follows:
And this code will avoid rewrite default config.