Author

Topic: Temperature monitoring for Linux/AMD GPU miners (Read 3355 times)

member
Activity: 88
Merit: 10
Thanks.  Maybe I'm a little OCD about watching over my stuff, but it makes me feel better to scan the logs when I get home and make sure everything is staying like I want it to be.   Grin
newbie
Activity: 9
Merit: 0
I like it. +1
member
Activity: 88
Merit: 10
While I'm stuck here waiting in the Newbie section, I figured I'd share a little trick for Linux/AMD GPU miners.  I am not near my mining rigs for most of the day, so I put a few scripts together to record GPU temps for me and save them for me to view when I want to.  I am not a scripting expert, so I'm open to suggestions, but these work for what I want.

1:  create a script to check the temperature of the cards, and store it in a file.

Code:

#!/bin/bash
date >> /home/your_directory_here/temperature_history.txt
sudo -u your_login_here DISPLAY=:0 aticonfig --odgt --adapter=all >> /home/your_directory_here/temperature_history.txt
echo "************************************************************************************************

************************************************************************************************" >> /home/your_directory_here/temperature_history.txt


2:  make the script file executable.

3:  create a directory to store all of your log files in.

4:  add a cron entry to run the script at whatever interval you want (1 min, 5 mins, 15 mins, etc)

Code:

crontab -e

Add the line below to check it every 15 minutes:

*/15 * * * * /home/your_directory_here/your_script_filename_here



5:  create a script to rotate the file every night.

Code:

#!/bin/bash
now=$(date +"%m_%d_%Y")
mv /home/your_directory_here/temperature_history.txt /home/your_directory_here/Temperature_History/temperature_history_$now

echo "History of GPU Temperature" > /home/your_directory_here/temperature_history.txt


6:  make the rotate script executable.

7:  add a cron entry to run the rotate script nightly at the same time.

Code:

crontab -e

50 23 * * * /home/your_directory_here/temperature_nightly_rotate.sh




That's it!  Now you can go back and analyze GPU temp anytime you want.



Jump to: