How to read the CPU&PMU temperature

From BananaPro/Pi
Jump to: navigation, search

Other languages:
English • ‎中文(简体)‎


You can read the CPU temperature by two ways. One way is directly reading the file /sys/class/thermal/thermal_zone1/temp, the other way is using lm-sensors tool.

lm_sensors (Linux-monitoring sensors), is a free open source software-tool for Linux that provides drivers and methods for monitoring temperatures, voltage, humidity and fans. It can also detect chassis intrusions.You also can read the PMU tempetature by the following way.


Read CPU temperature

Read CPU temperature directly

cat /sys/class/thermal/thermal_zone1/temp

Use lm-sensors to read temperature

Step 1: Install lm-sensors on Linux

sudo apt-get update
sudo apt-get install lm-sensors

After install the lm-sensors tool, you should reboot the system to get the it work:

sudo reboot

Step 2: Detect hardware monitoring chips

sudo sensors-detect

Step 3: Read the CPU temperature

sudo sensors
Adapter: Virtual device
temp1:         +0.0°C
Adapter: Virtual device
temp1:        +51.0°C  (crit = +105.0°C)

Read PMU temperature

For LeMaker Guitar

Type the command below to read PMU temperature:

cat /sys/devices/b0170000.i2c/i2c-0/0-0065/atc2603c-hwmon.0/ic_temperature