Bitcoin Forum

Bitcoin => Mining support => Topic started by: aknnig on February 14, 2016, 06:58:14 PM



Title: Temperature log from cgminer in Antminer s5
Post by: aknnig on February 14, 2016, 06:58:14 PM
Hi.

I am running Antminer s5. It uses cgminer.

I wish to monitor the temperature as a function of time and am interested in either the temperature log file or the file containing the current temperature. Or a simple Linux command that gives me the current temperature.

I am inside the s5 through Linux so I can easily create the log myself, if I knew where the file with the current temperature is.

Any comments from you will be highly appreciated.

Best regards,
aknnig


Title: Re: Temperature log from cgminer in Antminer s5
Post by: VirosaGITS on February 14, 2016, 10:20:26 PM
Hi.

I am running Antminer s5. It uses cgminer.

I wish to monitor the temperature as a function of time and am interested in either the temperature log file or the file containing the current temperature. Or a simple Linux command that gives me the current temperature.

I am inside the s5 through Linux so I can easily create the log myself, if I knew where the file with the current temperature is.

Any comments from you will be highly appreciated.

Best regards,
aknnig


Just pull the live temp value from cgminer's api;
https://github.com/ckolivas/cgminer/blob/master/API-README


Title: Re: Temperature log from cgminer in Antminer s5
Post by: aknnig on February 15, 2016, 10:25:57 PM
Thanks for the useful tip VirosaGITS.

In more details for the other newbies. For Antminer s5, use

   cgminer-api -o stats

to get all status data. temp1 can then be extracted using for example

   cgminer-api -o stats | sed 's/,/\n/g' | grep 'temp1='



Title: Re: Temperature log from cgminer in Antminer s5
Post by: VirosaGITS on February 15, 2016, 11:08:03 PM
Thanks for the useful tip VirosaGITS.

In more details for the other newbies. For Antminer s5, use

   cgminer-api -o stats

to get all status data. temp1 can then be extracted using for example

   cgminer-api -o stats | sed 's/,/\n/g' | grep 'temp1='



Thanks, i actually had a irl friend that does Android coding that was wondering how the API handling worked (he didnt have the time to do the research) and i just showed him the past, but i hadnt looked what command to send to cgminer though SSH to get the paste.

Its good to know, just for academic purposes too.


Title: Re: Temperature log from cgminer in Antminer s5
Post by: leowonderful on February 19, 2016, 12:18:27 AM
how do you even run s5s on cgminer? i'm curious as to how; I absolutely love seeing that bestshare and share accepted message.


Title: Re: Temperature log from cgminer in Antminer s5
Post by: aarons6 on February 19, 2016, 09:35:11 AM
Thanks for the useful tip VirosaGITS.

In more details for the other newbies. For Antminer s5, use

   cgminer-api -o stats

to get all status data. temp1 can then be extracted using for example

   cgminer-api -o stats | sed 's/,/\n/g' | grep 'temp1='



you have to run it every time you start the s5 but here is a way you can keep a log..

on the s5 the only folder that has write access is /config

making a small script.. something like this.

Code:
#!/bin/sh
echo $(date) "| temp monitor started"  > /www/pages/temperature.txt
echo $(date) "| temp monitor started"  > /config/temperature.txt
while true
do
var_avg=$( cgminer-api stats | grep "^ *\[temp_avg]")
var_max=$( cgminer-api stats | grep "^ *\[temp_max]")
echo $(date) "| normal operation: " AVG $var_avg MAX $var_max >> /www/pages/temperature.txt
echo $(date) "| normal operation: " $var_avg $var_max >> /config/temperature.txt
sleep 60
done


save it as temp.sh in the /config folder

chmod +x

./temp.sh &

what this wil do is create a txt file in /config and one in www/pages
so you can view it www.IP/temperature.txt

when you restart the s5 you have to ssh in and run /config/temp.sh & again


feel free to modify it as you need.