lm-sensors fixing #41

Closed
opened 2023-05-30 07:41:58 +00:00 by PeterSurda · 4 comments
Owner

I can't see the CPU temperature with lm-sensors, even though /sys/class/thermal/thermal_zone0/temp does show the temperature. According to these links:

https://github.com/lm-sensors/lm-sensors/issues/30
https://forum.openwrt.org/t/lm-sensors-for-bcm53xx/27886

for this to work correctly, CONFIG_THERMAL and CONFIG_HWMON need to be either both inside the kernel, or both as modules. Unfortunately, the kernel .config in OpenWRT has CONFIG_THERMAL=y and CONFIG_HWMON=m.

This would make it much easier to monitor the devices for me as collectd already suports the lm-sensors interface.

I can't see the CPU temperature with lm-sensors, even though `/sys/class/thermal/thermal_zone0/temp` does show the temperature. According to these links: https://github.com/lm-sensors/lm-sensors/issues/30 https://forum.openwrt.org/t/lm-sensors-for-bcm53xx/27886 for this to work correctly, `CONFIG_THERMAL` and `CONFIG_HWMON` need to be either both inside the kernel, or both as modules. Unfortunately, the kernel `.config` in OpenWRT has `CONFIG_THERMAL=y` and `CONFIG_HWMON=m`. This would make it much easier to monitor the devices for me as collectd already suports the lm-sensors interface.
lee.miller was assigned by PeterSurda 2023-05-30 07:42:06 +00:00
Collaborator

This is strange. On my orangepi plus I don't need additional changes:

root@OpenWrt:~# cat /sys/class/thermal/thermal_zone0/temp 
54605
root@OpenWrt:~# sensors 
cpu_thermal-virtual-0
Adapter: Virtual device
temp1:        +54.7°C  (crit = +100.0°C)
This is strange. On my `orangepi plus` I don't need additional changes: ``` root@OpenWrt:~# cat /sys/class/thermal/thermal_zone0/temp 54605 root@OpenWrt:~# sensors cpu_thermal-virtual-0 Adapter: Virtual device temp1: +54.7°C (crit = +100.0°C) ```
Author
Owner

Well, all I can tell you on a CM4 it doesn't work. I'm just making an educated guess about the cause. But maybe I can try using the collectd's thermal plugin instead. I'll get back to you once I tried it.

Well, all I can tell you on a CM4 it doesn't work. I'm just making an educated guess about the cause. But maybe I can try using the collectd's thermal plugin instead. I'll get back to you once I tried it.
Collaborator

Actually the sunxi kernel config differs, it has CONFIG_HWMON=y, CONFIG_THERMAL_HWMON=y.

Actually the sunxi kernel config differs, it has `CONFIG_HWMON=y`, `CONFIG_THERMAL_HWMON=y`.
Author
Owner

I found out how to use the thermal plugin to monitor the temp, so this isn't needed anymore.

I found out how to use the `thermal` plugin to monitor the temp, so this isn't needed anymore.
Sign in to join this conversation.
No Label
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Sysdeploy/openwrt#41
No description provided.