树莓派查看CPU和GPU温度

#!/bin/bash - 
#===============================================================================
#
#          FILE: temp.sh
# 
#         USAGE: ./temp.sh 
# 
#   DESCRIPTION: 
# 
#       OPTIONS: ---
#  REQUIREMENTS: ---
#          BUGS: ---
#         NOTES: ---
#        AUTHOR: Yehun (), [email protected]
#  ORGANIZATION: Yehun
#       CREATED: 03/09/2018 01:40:25 PM
#      REVISION:  ---
#===============================================================================

cat /sys/class/thermal/thermal_zone0/temp | awk '{print "CPU Temp:"(int($0) / 1000)}'
/opt/vc/bin/vcgencmd measure_temp | cut -c6-9 | awk '{print "GPU Temp:"$0}'

猜你喜欢

转载自my.oschina.net/yehun/blog/1633498