Pages:
Author

Topic: [ANN] FarmCP - Web-based Rig Control Panel on your rig (Linux, BAMT) (Read 6069 times)

full member
Activity: 144
Merit: 100
Sorry for the late replies.

wangzr1991: The puma script is sometimes a bit buggy, we are working on that. But basically, if you have issues like that, make sure it is not running then delete the file in question (pumactl.sock or puma.sock). Or try just using start instead of restart.

kupan787: maybe we could make a conf option to toggle WU or the hashrate that we currently display. Not sure if there is enough space to display both.

David is helping me with code now, we are making some improvements. Adding optional public per-rig URLs soon that you can use on betarigs for example.
If you have an old version I suggest you update, there are a few improvements like displaying the pool for each rig and rig tags.
full member
Activity: 135
Merit: 100
Any chance you can add in display of the WU as well as hash rate?
full member
Activity: 135
Merit: 100
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.
full member
Activity: 210
Merit: 100
Cool app will try this
newbie
Activity: 1
Merit: 0
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?
full member
Activity: 144
Merit: 100
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
Code:
rvm cleanup all
bundle install
script/puma start
full member
Activity: 144
Merit: 100
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.
newbie
Activity: 20
Merit: 0
I've started with 700MB available and it still ran out of space.

can u check if anything went wrong?


Code:

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$


hero member
Activity: 1151
Merit: 528
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.
legendary
Activity: 952
Merit: 1000
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?
hero member
Activity: 1151
Merit: 528
This looks awesome! Trying it out now!
sr. member
Activity: 308
Merit: 250
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.
full member
Activity: 462
Merit: 100
Can this be setup on web-hosting rented from  somewhere and just pointed at CGMiner via API?
newbie
Activity: 2
Merit: 0
(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/master

Let 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.


full member
Activity: 144
Merit: 100
Instructions for installing rvm are already written in README, maybe you missed it: https://github.com/mrbrdo/farmcp/blob/master/README.md
Start at first line (sudo apt-get install curl).. Wink

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...)?
newbie
Activity: 5
Merit: 0
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
full member
Activity: 144
Merit: 100
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).
full member
Activity: 196
Merit: 100
Code looks pretty decent. I left a couple comments, but found nothing suspect. This looks clean as of 1/31 11PM CST.
full member
Activity: 196
Merit: 100
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.
full member
Activity: 144
Merit: 100
If you like it, please post a comment and spread the word. Or if you have any problems, let me know as well.
Pages:
Jump to: