Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding GPU temperature #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions raspberrypi_exporter
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,13 @@ for SENSOR in $(ls /sys/class/thermal/); do

echo "${PREFIX}temperature{sensor=\"${SENSOR}\",type=\"${CPU_TYPE}\"} ${CPU_TEMP_CELSIUS}" >> "${TMP_FILE}"
done
{
echo "# HELP ${PREFIX}gpu_temperature Temperatures of the components in degree celsius.";
echo "# TYPE ${PREFIX}gpu_temperature gauge";
} >> "${TMP_FILE}"
GPU_TEMP_CELSIUS="$( $VCGEN measure_temp | cut -d'=' -f2 | cut -d"'" -f1 )" || true
GPU_TEMP_CELSIUS="${GPU_TEMP_CELSIUS:=0}"
echo "${PREFIX}gpu_temperature{sensor=\"bcm2835\",type=\"gpu\"} ${GPU_TEMP_CELSIUS}" >> "${TMP_FILE}"

# get component frequencies
{
Expand Down