arvicco-avalon 0.0.12 → 0.0.14

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -1,10 +1,12 @@
1
- # Avalon
1
+ # arvicco-avalon
2
2
 
3
- Helper scripts for Bitcoin and Avalon miners management...
3
+ Helper scripts for Bitcoin mining units management...
4
4
 
5
5
  ## Description
6
6
 
7
- Congrats, you've got a few Avalon miners. It's all nice and dandy, but now you need to keep an eye on them to make sure they are always online and their valuable hashes are not wasted. This set of scripts is written to do just that. You run a monitor scipt non-stop and it keeps an eye on your Avalons, your (private) pool and your Internet connection, and alerts you as soon as there are any problems. The scripts should work on OSX and Linux (Windows users, move on).
7
+ Congrats, you've got a few Bitcoin miners. It's all nice and dandy, but now you need to keep an eye on them to make sure they are always online and their valuable hashes are not wasted. This set of scripts is written to do just that. You run a monitor scipt non-stop and it keeps an eye on your mining units, your (private) pool and your Internet connection, and alerts you in case of any problems. The scripts should work on OSX and Linux (Windows users, move on).
8
+
9
+ Initially, the scripts were used to manage an installation of Avalon miners, but they work just as well with any cgminer (or bfgminer) based device with known IP address and cgminer API enabled. It's been proven to work on such exotic devices as Raspberry Pi attached to Block Eruptor Blades as well as normal computers with FPGA or GPU attached. So, you can easily monitor all your mining zoo from one central location.
8
10
 
9
11
  ## Usage
10
12
 
@@ -18,17 +20,17 @@ Scripts:
18
20
 
19
21
  - Transcodes raw transaction from base64 (mtgox) to hex (blockchain) format
20
22
 
21
- ## Installation
23
+ ## Script Installation
22
24
 
23
25
  You need Ruby 1.9 to install the scripts. Once the Ruby is installed, it's just:
24
26
 
25
27
  $ gem install arvicco-avalon
26
28
 
27
- You need to be able to ssh with public keys (that is no password required) into any Pool or Bitcoind node for monitor to work. How to do it is beyound the scope of this Readme, just google it. You also need to create ~/.avalon/monitor.yml config file, see below.
29
+ You also need to enable cgminer API in your miners and create ~/.avalon/monitor.yml config file, see below.
28
30
 
29
- ## Configuration
31
+ ## Monitor Configuration
30
32
 
31
- Sample monitor config file for production environment below. Modify it, add your own nodes to be monitored (for Avalon miners, you have to indicate their IP address and min hashrate in Gh/s):
33
+ Monitor script is periodically polling the mining units and other types of objects to be monitored (called Nodes). If any Node does not respond or returns an error, the monitor prints error message and sounds alert. You need to tell the monitor about your Miners and other Nodes to be polled via config file. Please note sample monitor config file for production environment below. Modify it, add your own Nodes to be monitored (for miners, you have to indicate their IP address and min hashrate in Gh/s):
32
34
 
33
35
  ------- ~/.avalon/monitor.yml --------
34
36
  # Prod configuration (default)
@@ -45,8 +47,17 @@ Sample monitor config file for production environment below. Modify it, add your
45
47
  :nodes:
46
48
  - [miner, 192.168.1.151, 70] # type, ip, gh/s
47
49
  - [miner, 192.168.1.152, 70]
48
- - [eloipool, 192.168.1.13, 4] # frequency of old block updates (once per X polls)
49
50
  - [internet, www.google.com, www.speedtest.net]
51
+ - [eloipool, 192.168.1.13, 4] # frequency of old block updates (once per X polls)
52
+
53
+ ## Miner/Node Configuration
54
+
55
+ The Mining units need to be configured so that monitor is able to poll them. Specifically you need to make cgminer API accessible from the IP address your Monitor script runs on. Normally, it is done by running cgminer with an option like: "--api-allow W:192.168.1.13" where 192.168.1.13 is IP address of your Monitor. For Avalon Miners, this can be configured via WebGui->CGminer Configuration->API Allow field.
56
+
57
+ Detailed description of cgminer API and relevant startup options can be found here:
58
+ https://github.com/ckolivas/cgminer/blob/master/API-README
59
+
60
+ For any Pool or Bitcoind nodes you'd like to monitor, you need to be able to ssh with public keys (that is, no password required) into this Node, otherwise the Monitor won't be able to poll it. How to make it work is beyound the scope of this Readme, just google 'ssh without password'.
50
61
 
51
62
  ## License
52
63
 
@@ -20,6 +20,11 @@ module Avalon
20
20
  # Report node errors (if any)
21
21
  @nodes.each {|node| node.report}
22
22
 
23
+ if @verbose
24
+ total_hash = @nodes.reduce(0) {|hash, node| hash + (node[:mhs] || 0)}
25
+ puts "Total hash rate: #{total_hash}"
26
+ end
27
+
23
28
  sleep @timeout
24
29
 
25
30
  end
@@ -1,3 +1,3 @@
1
1
  module Avalon
2
- VERSION = "0.0.12"
2
+ VERSION = "0.0.14"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: arvicco-avalon
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.12
4
+ version: 0.0.14
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-06-20 00:00:00.000000000 Z
12
+ date: 2013-06-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: faraday