$ cat /sys/class/thermal/thermal_zone0/temp
Shell script, chktemp.sh, with the following content print the CPU temperature:
temp=$(cat /sys/class/thermal/thermal_zone0/temp)
echo CPU Temp.= $(($temp/1000)) C
To make it executable:
$ sudo chmod +x chktemp.sh
Run it:
$ ./chktemp.sh
No comments:
Post a Comment