System temp
0xicl33n opened this issue · comments
Im using an asic with minera, because of that the system temp does not work. How is system temp measured? Does it come from gpus or the board? I was thinking of wiring a temp sensor like a DHT11 to the board i have ( im using a beaglebone ) like you would with an arduino or something. Also, we could use lm-sensors to return temp data instead. That would be cool too
Id prefer to use lm-sensors for the controller temp than wiring a temp sensor onto the board
DHT11:
https://www.adafruit.com/products/386
lm-sensors:
https://wiki.archlinux.org/index.php/Lm-sensors
System temp comes from Raspberry integrated sensor, while the miner devices have their own sensors (when present) and it's the miner software to get it (cgminer, bfgminer, etc...)
Not possible to add and external one, I mean you can but Minera cannot get the value, you should hack it.
on a regular computer changing $temp
in application/models/util_model.php
to
$temp = number_format( ( (int)exec(sensors | awk '/^Core /{++r; gsub(/[^[:digit:]]+/, "", $3); s+=$3} END{print s/(r)}')));
should work with a regular pc, the beaglebone however doesnt have a built in sensor. of course im not sure if my php is formatted properly.
then of course you have to change the rpi_temp_file to something else that does exist but thats not a big deal, im gonna give this a test in a sec.
oh well thanks for that, I could try to check if it's a RPI or not and add your check for "regular" PC.
But that doesn't give you the mining hardware temperature, only the system controller one.
another thing i did with a second raspi that doesnt have minera or miners hooked up is write a simple script on it which just copies the temp from the raspi over the network to the other pc, just so i can get a "room temp" in minera( it just bugs me how it says 0 temp!):
#!/bin/bash
while [ : ]
do
echo "copying temp"
cp /sys/class/thermal/thermal_zone0/temp /tmp/temp
scp /tmp/temp root@hera:/tmp/roomtemp
echo "sleeping 2minutes"
sleep 2m
done
and then change rpi_temp_file
to point at /tmp/roomtemp
this method is VERY hack-y.. but it works!
http://screencloud.net/v/vI0O the result
to reiterate, the temp is copied from the raspi to the beaglebone