NanoPi NEOもラズパイなどと同様に/sys/class/thermal/ にある温度センサーでCPUの温度を得られる
# cat /sys/class/thermal/thermal_zone0/temp
39974
単位は1/1000℃
1000で割った値が欲しいならば
# cat /sys/class/thermal/thermal_zone0/temp |awk '{print $1/1000}'
39.551
カーネルのドキュメント
/sys/class/thermal を散策してみる
# cd /sys/class/thermal/
# ls
cooling_device0 thermal_zone0
# cd thermal_zone0/
# ls
available_policies integral_cutoff subsystem trip_point_2_temp
cdev0 k_d sustainable_power trip_point_2_type
cdev0_trip_point k_i temp trip_point_3_hyst
cdev0_weight k_po trip_point_0_hyst trip_point_3_temp
cdev1 k_pu trip_point_0_temp trip_point_3_type
cdev1_trip_point mode trip_point_0_type type
cdev1_weight offset trip_point_1_hyst uevent
cdev2 policy trip_point_1_temp
cdev2_trip_point power trip_point_1_type
cdev2_weight slope trip_point_2_hyst
# cat type
cpu_thermal
# cat mode
enabled
# cat trip_point_3_type
critical
# cat trip_point_3_temp
105000
#
105℃が限界の温度のようだ。