mrbrdo (OP)
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
January 29, 2014, 10:07:58 PM Last edit: January 30, 2014, 12:56:46 AM by mrbrdo |
|
Hello guys, I want to share a little dashboard I've made for my farm. I am using BAMT 1.3 on my rigs, but the web interface was not good enough, I wanted to at least be able to switch pools without sshing to each of my rigs. Features:* only need to install on one of your rigs * works on any Linux-based system * open-source and free * pretty cool dashboard on which you can monitor all your rigs hashrate, temperature and rejected shares * ability to add a pool to all of your rigs at the same time, and switch pools on each rig * anyone can contribute new features (Ruby on Rails project) Download and installation instructions:https://github.com/mrbrdo/farmcp/blob/master/README.mdDonations welcome: 1NfCD5dEJv6MxwiAFF4S68t4r7QxkCSnPs (BTC) Screenshots:![](https://ip.bitcointalk.org/?u=https%3A%2F%2Fi.imgur.com%2Fs4svPDX.png&t=665&c=zx02qx0zDYSDeA) ![](https://ip.bitcointalk.org/?u=https%3A%2F%2Fi.imgur.com%2FAazewCo.png&t=665&c=_vVl6egcSsDwCQ) Let me know if you find it helpful. Security audit welcome, some people are always paranoid ![Smiley](https://bitcointalk.org/Smileys/default/smiley.gif) I will also probably implement a simple API, which will be supported in my iOS app (Android coming soon).
|
|
|
|
mrbrdo (OP)
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
January 30, 2014, 12:03:28 AM |
|
If you like it, please post a comment and spread the word. Or if you have any problems, let me know as well.
|
|
|
|
roastbeef
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
February 01, 2014, 04:58:12 AM |
|
Someone just sent this link to me. This looks very cool. I'm going to review the code then give it a try on my ubuntu rigs this weekend.
|
https://chunkypools.com - POT | WC | DOGE | MUN | RPC | DEF | DGB | KDC | RUBY | POT | STP | SPN | PCN 1% PROP - SSL - custom MPOS - profit-switching port - single-sign on - great IRC community - scalable architecture - no downtime
|
|
|
roastbeef
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
February 01, 2014, 05:10:07 AM |
|
Code looks pretty decent. I left a couple comments, but found nothing suspect. This looks clean as of 1/31 11PM CST.
|
https://chunkypools.com - POT | WC | DOGE | MUN | RPC | DEF | DGB | KDC | RUBY | POT | STP | SPN | PCN 1% PROP - SSL - custom MPOS - profit-switching port - single-sign on - great IRC community - scalable architecture - no downtime
|
|
|
mrbrdo (OP)
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
February 02, 2014, 12:53:25 AM |
|
Thanks. I did a bit of refactor as per your comments, so code should be cleaner now. Added profitability calculator. You can enter difficulty and reward manually or fetch it from a MPOS pool website (most common pool web interface). ![](https://ip.bitcointalk.org/?u=https%3A%2F%2Fi.imgur.com%2FCcs8iqA.png&t=665&c=zoc_-6RqTY9o3Q)
|
|
|
|
Kisu
Newbie
Offline
Activity: 5
Merit: 0
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
February 02, 2014, 08:25:32 PM |
|
installation instructions: Looks nice, but apparently SMOS doesn't have rvm.. user@smos-1:/tmp$ rvm install ruby-2.1.0 -bash: rvm: command not found Any suggestions? I'm not that good with Linux.. ![Embarrassed](https://bitcointalk.org/Smileys/default/embarrassed.gif)
|
|
|
|
mrbrdo (OP)
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
February 02, 2014, 09:07:11 PM |
|
Instructions for installing rvm are already written in README, maybe you missed it: https://github.com/mrbrdo/farmcp/blob/master/README.mdStart at first line (sudo apt-get install curl).. ![Wink](https://bitcointalk.org/Smileys/default/wink.gif) Also if you are using SMOS or BAMT you might need to plug your usb into some Linux (e.g. Ubuntu) machine (also Virtualbox works) and use GParted to resize the ext4 partition. Because at least on BAMT 1.3 there is only a few MB of space left and this is barely (if even) enough to put farmcp there. You can check if you need to do this by writing "df -H", find the line that starts with "aufs". Check under "Avail" column, if it says only a few MB then you will probably need to resize. If it is at least 200MB or several GB then you're good. PS: Are you aware that on SMOS you are mining LTC every day for that serbian guy (at 3 AM in the night...)?
|
|
|
|
afinegan
Newbie
Offline
Activity: 2
Merit: 0
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
February 03, 2014, 12:04:22 AM Last edit: February 03, 2014, 12:14:32 AM by afinegan |
|
(I am a jquery/php/perl guy myself, haven't got into ruby though) Great addon, I was installing it on my debian linux box and I am trying to have it connect to my remote cgminers. miner.php that comes with cgminer is working properly so I know I have the remote cgminer api's setup right, but when I run this script locally, it doesn't show any of the miners. This is my local config for ~/.farmcp { "username" : "user", "password" : "pass", "rigs" : [ "192.168.0.4" ] } (fake ip) (through debugging the json calls) I see it calling this script: http://192.168.0.3:8080/data.json (the server running farmcp is different than the actual farm) and the response is: {"btc_value":{"btcde":604.7862170362157,"bitstamp":817.308697879499},"rig_info":[],"rig_overview":{"temp":0,"fan_p":0,"mhs":0,"accepted":0,"rejected":0,"max_temp":0,"max_fan_p":0}} SO it is reply with 0 rig info meaning its not reading the local config file, even though it asks em for a password when I first login (and the username and password works) I have the latest git pull from https://github.com/mrbrdo/farmcp/blob/masterLet me know, I am trying to look around the code to see if I can find the issue (curl is working fine on the box from the prompt) EDIT: I think I need to revert the git pull to before the refactor, I think im seeing the missing rig parser from the config file.
|
|
|
|
CrimsonGT
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
February 04, 2014, 06:01:31 PM |
|
Can this be setup on web-hosting rented from somewhere and just pointed at CGMiner via API?
|
|
|
|
gsupp
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
February 05, 2014, 04:53:16 PM |
|
This looks awesome! Any chance of adding per-rig management of pools? I'd like to be able to add/remove/switch pools on a per rig basis, ideally with a way to group rigs together and make changes on a group at a time.
|
|
|
|
soothaa
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
February 06, 2014, 02:18:54 AM |
|
This looks awesome! Trying it out now!
|
|
|
|
crazyates
Legendary
Offline
Activity: 952
Merit: 1000
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
February 06, 2014, 02:26:22 AM |
|
Does this need to be run on a miner, or can it be installed on any linux machine on the same network as the miners?
|
|
|
|
soothaa
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
February 06, 2014, 02:56:18 AM |
|
Does this need to be run on a miner, or can it be installed on any linux machine on the same network as the miners?
I've got 3 instances of it running on my monitoring VM - just needs to be able to access the JSON RPC of cgminer.
|
|
|
|
Nachi888
Newbie
Offline
Activity: 20
Merit: 0
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
February 06, 2014, 11:48:39 AM |
|
I've started with 700MB available and it still ran out of space. can u check if anything went wrong? user@4-r9-270x-vapor-x:~$ df -H Filesystem Size Used Avail Use% Mounted on aufs 1.4G 555M 718M 44% / tmpfs 1.5G 0 1.5G 0% /lib/init/rw varrun 1.5G 95k 1.5G 1% /var/run varlock 1.5G 0 1.5G 0% /var/lock udev 1.5G 177k 1.5G 1% /dev tmpfs 1.5G 4.1k 1.5G 1% /dev/shm /dev/sda1 551M 534M 17M 97% /live/image /dev/sda2 1.4G 555M 718M 44% /live/cow tmpfs 1.5G 0 1.5G 0% /live varlog 1.5G 95M 1.4G 7% /var/log tmpfs 1.5G 16M 1.5G 2% /tmp user@4-r9-270x-vapor-x:~$ sudo apt-get install curl Reading package lists... Done Building dependency tree Reading state information... Done curl is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 177 not upgraded. user@4-r9-270x-vapor-x:~$ \curl -sSL https://get.rvm.io | bash -s stable Downloading https://github.com/wayneeseguin/rvm/archive/stable.tar.gz
Upgrading the RVM installation in /home/user/.rvm/ RVM PATH line found in /home/user/.profile /home/user/.bashrc /home/user/.zshrc. RVM sourcing line found in /home/user/.bash_profile /home/user/.zlogin. Upgrade of RVM in /home/user/.rvm/ is complete.
# user, # # Thank you for using RVM! # We sincerely hope that RVM helps to make your life easier and more enjoyable!!! # # ~Wayne, Michal & team.
In case of problems: http://rvm.io/help and https://twitter.com/rvm_io
Upgrade Notes:
* No new notes to display.
user@4-r9-270x-vapor-x:~$ rvm install ruby-2.1.0 Searching for binary rubies, this might take some time. No binary rubies available for: debian/6/i386/ruby-2.1.0. Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies. Checking requirements for debian. Installing requirements for debian. Updating system.... Installing required packages: libreadline6-dev, libyaml-dev, libsqlite3-dev, libgdbm-dev, bison, libffi-dev...... Requirements installation successful. Installing Ruby from source to: /home/user/.rvm/rubies/ruby-2.1.0, this may take a while depending on your cpu(s)... ruby-2.1.0 - #downloading ruby-2.1.0, this may take a while depending on your connection... % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 11.4M 100 11.4M 0 0 385k 0 0:00:30 0:00:30 --:--:-- 616k ruby-2.1.0 - #extracting ruby-2.1.0 to /home/user/.rvm/src/ruby-2.1.0. ruby-2.1.0 - #applying patch /home/user/.rvm/patches/ruby/2.1.0/changeset_r44327.diff. ruby-2.1.0 - #applying patch /home/user/.rvm/patches/ruby/GH-488.patch. ruby-2.1.0 - #configuring.................................................... ruby-2.1.0 - #post-configuration. ruby-2.1.0 - #compiling................................................................................... ruby-2.1.0 - #installing................................ ruby-2.1.0 - #making binaries executable. ruby-2.1.0 - #downloading rubygems-2.2.2 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 404k 100 404k 0 0 205k 0 0:00:01 0:00:01 --:--:-- 538k No checksum for downloaded archive, recording checksum in user configuration. ruby-2.1.0 - #extracting rubygems-2.2.2. ruby-2.1.0 - #removing old rubygems. ruby-2.1.0 - #installing rubygems-2.2.2.............. ruby-2.1.0 - #gemset created /home/user/.rvm/gems/ruby-2.1.0@global ruby-2.1.0 - #importing gemset /home/user/.rvm/gemsets/global.gems..... ruby-2.1.0 - #generating global wrappers. ruby-2.1.0 - #gemset created /home/user/.rvm/gems/ruby-2.1.0 ruby-2.1.0 - #importing gemsetfile /home/user/.rvm/gemsets/default.gems evaluated to empty gem list ruby-2.1.0 - #generating default wrappers. ruby-2.1.0 - #adjusting #shebangs for (gem irb erb ri rdoc testrb rake). Install of ruby-2.1.0 - #complete Ruby was built without documentation, to build it run: rvm docs generate-ri user@4-r9-270x-vapor-x:~$ cd ~ user@4-r9-270x-vapor-x:~$ git clone https://github.com/mrbrdo/farmcp.git fatal: destination path 'farmcp' already exists and is not an empty directory. user@4-r9-270x-vapor-x:~$ cd farmcp ruby-2.1.0 - #gemset created /home/user/.rvm/gems/ruby-2.1.0@farmcp ruby-2.1.0 - #generating farmcp wrappers. user@4-r9-270x-vapor-x:~/farmcp$ bundle install Fetching gem metadata from https://rubygems.org/......... Fetching additional metadata from https://rubygems.org/.. Fetching git://github.com/mrbrdo/mina-extras.git remote: Reusing existing pack: 31, done. remote: Total 31 (delta 0), reused 0 (delta 0) Receiving objects: 100% (31/31), 4.10 KiB, done. Resolving deltas: 100% (12/12), done. Installing rake (10.1.1) Installing i18n (0.6.9) Using minitest (4.7.5) Installing multi_json (1.8.4) Installing atomic (1.1.14) Installing thread_safe (0.1.3) Installing tzinfo (0.3.38) Installing activesupport (4.0.0) Installing builder (3.1.4) Installing erubis (2.7.0) Installing rack (1.5.2) Installing rack-test (0.6.2) Installing actionpack (4.0.0) Installing mime-types (1.25.1) Installing polyglot (0.3.3) Installing treetop (1.4.15) Installing mail (2.5.4) Installing actionmailer (4.0.0) Installing activemodel (4.0.0) Installing activerecord-deprecated_finders (1.0.3) Installing arel (4.0.1) Installing activerecord (4.0.0) Installing coderay (1.1.0) Installing coffee-script-source (1.6.3) Installing execjs (2.0.2) Installing coffee-script (2.2.0) Installing thor (0.18.1) Installing railties (4.0.0) Installing coffee-rails (4.0.1) Installing unf_ext (0.0.6) Installing unf (0.1.3) Installing domain_name (0.5.15) Installing dotenv (0.9.0) Installing dotenv-rails (0.9.0) Installing sass (3.2.13) Installing foundation-rails (5.0.3.1) Installing tilt (1.4.1) Installing haml (4.0.5) Installing haml-rails (0.5.1) Installing hike (1.2.3) Installing http-cookie (1.0.2) Installing jquery-rails (3.0.4) Using json (1.8.1)
script/puma start Installing libv8 (3.16.14.3) Installing net-http-digest_auth (1.4) Installing net-http-persistent (2.9.1) Installing mini_portile (0.5.2) Installing nokogiri (1.6.1) Installing ntlm-http (0.1.1) Installing webrobots (0.1.1) Installing mechanize (2.7.2) Installing method_source (0.8.2) Installing open4 (1.3.0) Installing mina (0.3.0) Using mina-extras (0.0.3) from git://github.com/mrbrdo/mina-extras.git (at master) Installing slop (3.4.7) Installing pry (0.9.12.4) Installing pry-rails (0.3.2) Installing puma (2.7.1) Using bundler (1.5.3) Installing sprockets (2.10.1) Installing sprockets-rails (2.0.1) Installing rails (4.0.0) Installing ref (1.0.5) Installing sass-rails (4.0.1)
Errno::ENOSPC: No space left on device @ io_write - /home/user/.rvm/gems/ruby-2.1.0@farmcp/gems/sequel-4.6.0/lib/sequel/model/associations.rb An error occurred while installing sequel (4.6.0), and Bundler cannot continue. Make sure that `gem install sequel -v '4.6.0'` succeeds before bundling. user@4-r9-270x-vapor-x:~/farmcp$ user@4-r9-270x-vapor-x:~/farmcp$ script/puma start Could not find sequel-4.6.0 in any of the sources Run `bundle install` to install missing gems. user@4-r9-270x-vapor-x:~/farmcp$ df -H Filesystem Size Used Avail Use% Mounted on aufs 1.4G 1.3G 0 100% / tmpfs 1.5G 0 1.5G 0% /lib/init/rw varrun 1.5G 95k 1.5G 1% /var/run varlock 1.5G 0 1.5G 0% /var/lock udev 1.5G 177k 1.5G 1% /dev tmpfs 1.5G 4.1k 1.5G 1% /dev/shm /dev/sda1 551M 534M 17M 97% /live/image /dev/sda2 1.4G 1.3G 0 100% /live/cow tmpfs 1.5G 0 1.5G 0% /live varlog 1.5G 96M 1.4G 7% /var/log tmpfs 1.5G 16M 1.5G 2% /tmp user@4-r9-270x-vapor-x:~/farmcp$
|
|
|
|
mrbrdo (OP)
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
February 06, 2014, 12:36:41 PM |
|
SO it is reply with 0 rig info meaning its not reading the local config file, even though it asks em for a password when I first login (and the username and password works)
Sounds to me like you don't have api-listen and api-allow set properly? If farmcp cannot connect to your cgminer RPC then something like this will happen. The info on how to set it up is in the readme.
|
|
|
|
mrbrdo (OP)
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
February 06, 2014, 12:39:40 PM Last edit: February 06, 2014, 12:50:51 PM by mrbrdo |
|
Can this be setup on web-hosting rented from somewhere and just pointed at CGMiner via API?
Yes, but you need to open cgminer RPC to the IP of that server. That is actually exactly how I had it set up before on coin.mrbrdo.net (still works but old version). This looks awesome! Any chance of adding per-rig management of pools? I'd like to be able to add/remove/switch pools on a per rig basis, ideally with a way to group rigs together and make changes on a group at a time.
This is already implemented, you can add a pool to all rigs, and switch pools per-rig. I will add more features for this later probably. Does this need to be run on a miner, or can it be installed on any linux machine on the same network as the miners?
It doesn't need to run on miner, it can run in local LAN or even on remote server if you open ports and set api-allow correctly. I've started with 700MB available and it still ran out of space.
can u check if anything went wrong?
At the end it shows that you have no space left.. So it seems you need even more space. Weird, but it seems so. It is a bit weird because I was able to install on BAMT without resizing partition initially. But perhaps there are temporary files it needs while building and you run out of space while installing. Try running rvm cleanup all bundle install script/puma start
|
|
|
|
wangzr1991
Newbie
Offline
Activity: 1
Merit: 0
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
February 20, 2014, 02:38:00 AM |
|
When I tried to restart it, it shows: user@bamt-miner:~/farmcp$ sudo /etc/init.d/puma restart Restarting Puma rack web server: puma--> About to restart puma /home/user/farmcp:Connection refused - connect(2) for "/home/user/farmcp/log/pumactl.sock"
What should I do?
|
|
|
|
softron
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
February 28, 2014, 02:22:40 PM |
|
Cool app will try this
|
|
|
|
kupan787
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 01, 2014, 05:27:13 AM Last edit: March 02, 2014, 03:49:59 AM by kupan787 |
|
Can anyone with BAMT up let me know the contents of their /etc/apt/sources.list file? I was modifying mine to try and get something else working, and can't install this as it can't find dependencies.
Edit: Nevermind, I just extracted the file from a base install of BAMT. I got this up and running now.
|
|
|
|
kupan787
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 02, 2014, 11:14:28 PM |
|
Any chance you can add in display of the WU as well as hash rate?
|
|
|
|
|