QortalOS Brooklyn for Raspberry Pi 4
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
#!/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}" |