Here is the plan:
- Every miner creates a log file - Collect all log files on your webserver - Analyse and display log files
Enable logging in /etc/rc.local
/root/veriumMiner/cpuminer -o bla -u blabla --no-color >> /root/veriumMiner/verium_hostname.log &
by piping ( >> ) the output to a file. Better use the option --no-color .
SSH into the webserver. Before you can automatically collect all the logs, create a ssh key without a password.
Just hit return, don't enter a password!
Then copy the ssh key to each miner
ssh-copy-id -i ~/.ssh/id_rsa.pub [email protected]
Configure the user and IP and here you have to enter the password for it.
Now create a shell script
and enter a line for every miner like
rsync -avze ssh [email protected]:/root/veriumMiner/verium_hostname.log /wwwhome/verium_hostname.log
then don't forget to make it executeable
chmod +x getlogs.sh
Now you can do as much statistics with the log files as you like using php webscripts or maybe a perl script.
On the Odroid I find its temperature here
sudo cat /sys/devices/virtual/thermal/thermal_zone0/temp
but this file cannot be copied directly by rsync.
So we set up a cron job to execute a script
with a couple of these lines (you might want to take a few samples)
cat /sys/devices/virtual/thermal/thermal_zone0/temp >> ~/hostname.temp sleep 1
and make it executeable.
chmod +x templog.sh
Create the cronjob by
and add the line
# m h dom mon dow command
- /10 * * * * /root/templog.sh
Now we collect the temp logs along with the others
rsync -avze ssh [email protected]:/root/hostname.temp /wwwhome/verium_hostname.temp