Tiny Core Linux
Tiny Core Base => CorePlus => Topic started by: malikawan on April 26, 2016, 03:31:30 AM
-
Any way to check cpu temperature with script or command. I am using lm-sensor but it don't detect any sensor. Is there any setting after installing lm-sensor utility
-
How about this.
Not using lmsensor just regular linux commands.
Temp in Celsius with 2 decimals.
echo $'scale=2\n'$(cat /sys/class/thermal/thermal_zone0/temp)/1000 | bc
-
Did you install the hwmon extension? Without that, you won't get cpu temp.
-
its not working
cat: /sys/class/thermal/thermal_zone0/temp: No such file or directory
sh: cat:: not found
-
Yes curaga i have install the hwmon extension
-
Is there any setting after installing lm-sensor utility
Yes, run:
sudo sensors-detect
Persistency:
Add /etc/sysconfig/lm_sensors to your backup.
Check /etc/sysconfig/lm_sensors for what modules are needed.
Load those modules in /opt/bootlocal.sh .
For example:
modprobe coretemp
-
Another attempt:
#!/bin/sh
for i in /sys/class/hwmon/hwmon*
do
[ -e "$i"/temp*_label ] && LABEL="$(cat $i/temp*_label)" || LABEL="$(cat $i/name)"
TEMP="$(( $(cat $i/*_input) / 1000 ))"
echo -e "$LABEL: \t$TEMP°C"
done