Skip to content
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