mirror of
https://github.com/Qortal/Brooklyn.git
synced 2025-01-30 23:02:18 +00:00
7 lines
215 B
Bash
7 lines
215 B
Bash
#!/bin/bash
|
|
prefix="temp="
|
|
suffix="'C"
|
|
gpu=$(/opt/vc/bin/vcgencmd measure_temp)
|
|
gpu_temp=${gpu#$prefix}
|
|
gpu_temp=${gpu_temp%$suffix}
|
|
echo -e "{\"cpu\":"$(</sys/class/thermal/thermal_zone0/temp)", \"gpu\":$gpu_temp}" |