hjelev / rpi-mqtt-monitor

Raspberry Pi MQTT Monitor gathers system information and sends it to a MQTT server.
GNU General Public License v3.0
176 stars 42 forks source link

help troubleshoot: cpu temperature not available #86

Closed duceduc closed 5 months ago

duceduc commented 7 months ago

Hi. I've installed the script on a Ubuntu 22.04 OS. The cpu temperature isn't available when I try running below cat. Any idea why it is not displaying?? I am using a Beelink mini pc.

ser@ser:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04.3 LTS
Release: 22.04
Codename: jammy
ser@ser:~$ cat /sys/class/thermal/thermal_zone*/temp 2> /dev/null | sed 's/\(.\)..$//' | tail -n 1
ser@ser:~$ cat /sys/devices/virtual/thermal/thermal_zone0*/temp 2> /dev/null | sed 's/\(.\)..$//' | tail -n 1
ser@ser:~$ sudo systemctl status rpi-mqtt-monitor.service
● rpi-mqtt-monitor.service - System Sensors Monitor
 Loaded: loaded (/etc/systemd/system/rpi-mqtt-monitor.service; disabled; vendor preset: enabled)
 Active: active (running) since Tue 2024-02-13 07:56:53 JST; 46min ago
 Main PID: 58972 (python3)
 Tasks: 4 (limit: 15302)
 Memory: 22.5M
 CPU: 2.542s
 CGroup: /system.slice/rpi-mqtt-monitor.service
 └─58972 /usr/bin/python3 /srv/git/rpi-mqtt-monitor/src/rpi-cpu2mqtt.py --service

Feb 13 07:56:53 ser systemd[1]: Started System Sensors Monitor.
hjelev commented 7 months ago

Hi, can you show me the output of this cat command:

cat /sys/class/thermal/thermal_zone*/temp

I am also running this on mini pc and it works fine, currently I use ubuntu 23.10 but it was also working fine on 22

duceduc commented 7 months ago

This is the result.

Last login: Tue Feb 13 20:45:45 2024 from 192.168.1.111
ser@ser:~$ cat /sys/class/thermal/thermal_zone*/temp
cat: /sys/class/thermal/thermal_zone0/temp: No data available
hjelev commented 5 months ago

sorry can't help the data is missing or named differently.

duceduc commented 4 weeks ago

I was able to find the path to the cpu temp. /sys/class/hwmon/hwmon0/temp1_input