User Tools

Site Tools


miner_logs

Mining Logs

Here is the plan:

  1. Every miner creates a log file
  2. Collect all log files on your webserver
  3. 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.

ssh-keygen

Just hit return, don't enter a password!

Then copy the ssh key to each miner

ssh-copy-id -i ~/.ssh/id_rsa.pub root@192.168.0.110

Configure the user and IP and here you have to enter the password for it.

Now create a shell script

nano getlogs.sh

and enter a line for every miner like

rsync -avze ssh root@192.168.0.110:/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.

Temperature Logging

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

nano templog.sh

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

crontab -e

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 root@192.168.0.110:/root/hostname.temp /wwwhome/verium_hostname.temp
miner_logs.txt · Last modified: 2017/11/17 18:33 by 79.236.242.144