查看树莓派GPU和ARM CPU的温度

$ vi my-pi-temp.sh
--------------------------------

$ cat my-pi-temp.sh
#!/bin/bash
# Script: my-pi-temp.sh
# Purpose: Display the ARM CPU and GPU  temperature of Raspberry Pi 2/3 
# Author: Vivek Gite  under GPL v2.x+
# -------------------------------------------------------
cpu=$( $(/opt/vc/bin/vcgencmd measure_temp)"
echo "CPU => $((cpu/1000))'C"
--------------------------------

$ chmod +x my-pi-temp.sh
$ ./my-pi-temp.sh
Tue 11 Aug 15:32:33 CST 2020 @ raspberrypi
-------------------------------------------
GPU => temp=52.0'C
CPU => 52'C
--------------------------------

$ watch -n 1 -d ./my-pi-temp.sh
Every 1.0s: ./my-pi-temp.sh                          raspberrypi: Tue Aug 11 15:35:41 2020

Tue 11 Aug 15:35:41 CST 2020 @ raspberrypi
-------------------------------------------
GPU => temp=52.0'C
CPU => 52'C
--------------------------------

参考:

  • How to find out Raspberry Pi GPU and ARM CPU temperature on Linux

你可能感兴趣的:(查看树莓派GPU和ARM CPU的温度)