Hi guys,
Been experimenting with different cooling setups and thought this script might be handy for anyone who want to keep an eye on their GPU temperatures. Very quickly put together, but does the job.
Sample:
gputemp.sh
Then mrtg.conf:
... repeat for each gpu you want to monitor and change the parameter in the target (in my case i have 0 till 7).
Been experimenting with different cooling setups and thought this script might be handy for anyone who want to keep an eye on their GPU temperatures. Very quickly put together, but does the job.
Sample:
gputemp.sh
Code:
#!/bin/sh
export DISPLAY=:0
amdconfig --adapter=$1 --odgt | grep 'Temperature' | cut -d'-' -f2 | cut -c 2-3
echo 0
uptime | awk '{ gsub(/,/, ""); print $3, $4, $5; }'
uname -n
Then mrtg.conf:
Code:
WorkDir: /var/www/mrtg/
Target[gpu0.temp]: `/path/to/gputemp.sh 0`
MaxBytes[gpu0.temp]: 99
Title[gpu0.temp]: gpu0 Temperature
PageTop[gpu0.temp]: <H1> gpu0 temperature</H1>
ShortLegend[gpu0.temp]: C
YLegend[gpu0.temp]: Celsius
Options[gpu0.temp]: growright,nopercent, nobanner, noinfo, gauge
Unscaled[gpu0.temp]: ymd
... repeat for each gpu you want to monitor and change the parameter in the target (in my case i have 0 till 7).