Tag: monitoring

Orange Pi Zero : How to get the CPU temperature

If you purchased the small yet awesome orange pi zero on Aliexpress you certainly had huge problems to download some OS images on the official Orange PI website ,

you can download an image on the armbian website that’s compatible with the Orange pi zero

when your orange pi zero is finally fonctional there is several way to get the current temperature of the CPU.

first you can use the command : armbianmonitor -m this command is going to give you , the uptime , cpu speed and the current CPU temperature every 6 seconds.

 

but if you want to get that temperature for graphing purpose for cacti , munin , or grafana this command is not going to be usefull because of the autorefresh functionality

there is an other command that just return the cpu temperature

cat /sys/devices/virtual/thermal/thermal_zone1/temp 

OR

cat /sys/devices/virtual/thermal/thermal_zone0/temp

there is two sensor inside the Allwinner H2+ , you can add the two values and then divide the result by two to get an average temperature.

then you can graph the temperature using grafana for example

now that you know the temperature of your PI , you can somthing about it :
in an other article i talk about using the GPIOs of the PI to activate a fan when the temperature reach a set threshold.