1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

NanoPi NEOのCPUの温度を得る /sys/class/thermal

Last updated at Posted at 2018-02-13

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℃が限界の温度のようだ。

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?