Created
November 24, 2012 20:55
-
-
Save emgiezet/4141365 to your computer and use it in GitHub Desktop.
radeon gpu teperature logger
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
function console_mode | |
{ | |
echo -e "\033[30;42mPress Ctrl-C to break ...\033[0m" | |
while true; do | |
get_gpu | |
## gpu usage | |
echo -ne "\033[5G" | |
echo -ne "\033[1;37;41mGPU:\033[0m ${GPU}" | |
date=`date` | |
log=$date" - "$GPU | |
echo ${log} >> gpu.log | |
sleep 1 | |
done | |
} | |
function get_gpu | |
{ | |
GPU=`aticonfig --adapter=0 --od-gettemperature | grep "[[:digit:]]\{2\}[.][[:digit:]]\{2\}[ ]C$"` | |
} | |
if [ $# -eq 0 ]; then | |
console_mode | |
else | |
case $1 in | |
"--console") console_mode;; | |
esac | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment