Skip to content

Instantly share code, notes, and snippets.

@emgiezet
Created November 24, 2012 20:55
Show Gist options
  • Save emgiezet/4141365 to your computer and use it in GitHub Desktop.
Save emgiezet/4141365 to your computer and use it in GitHub Desktop.
radeon gpu teperature logger
#!/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