Bitcoin Forum
December 11, 2017, 05:52:02 PM *
News: Latest stable version of Bitcoin Core: 0.15.1  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: [ANN] - coinvert - Script to switch between script / nscrypt / keccak on BAMT  (Read 2577 times)
neurocis
Member
**
Offline Offline

Activity: 87

Dreams are realities un-manifested.


View Profile WWW
March 01, 2014, 06:39:14 AM
 #1

Some shell scrypt-fu I thought I would share that I prettied up for BAMT (specifically tested on r9 1.3), but would work on any linux flavor:

https://github.com/neurocis/coinvert

coinvert
[/size]

Motivation:

I was getting tired of the BAMT flavor of the month club and wanted to be able to mine any algorythm type and easily switch between them while preserving the core functionality of BAMT itself.

Authored by neurocis neurocis@gmail.com, released under GPLv3. BTC: 1DDqzhbbeKCm84SffUsDqbYH5FhGcJ33dy

Usage:

coinvert has 4 subcommands; install, link, mine and make.

Code:
install {miner}

Downloads from GIT url, configures and makes executable in /opt/miners by default, where {miner} can be:

Code:
cgminer-ckolivas
sgminer
vertminer
vertminer-thekev
cgminer-reorder

Also touches a file name .{algoryth} in the installation directory which identifies its algoryth type. If you have an existing miner you wish to link in coinvert, you will need to touch this file as well or it will not recognize it.

Code:
link {algorythm} {miner}

Creates a symlink representing the algorythm the miner is used for and the installed directory, typically you would link scrypt to either cgminer-ckolivas or sgminer, and nscrypt to vertminer or vertminer-thekev lastly keccak to cgminer-reorder.

Code:
mine {algorythm}|autoapi

Links up cgminer to point at your preferred miner for the specified algoryth and stops and restarts the miner. In the case of autoapi it will retrieve a JSON from a URL specified in the script (look near the top) and parse it based on a jq query for profitability, then if difference is greater than defined delta will relink to that type/miner.

Also links cgminer.conf to point to one specific to that algorythm, on bamt these are named /etc/bamt/algo-{algorythm}.conf.

coinvert mine auto-api can be placed in a cron job to poll and switch the miner as needed unattended.

Code:
make {git_url} {target_dir} {executable_name} {algorythm_name} {configure_parameters}

See script for operation, but is called by install to clone, configure and make a miner.

Installation:

Code:
sudo su
#
# Depends on curl to grab aloryth score via JSON
apt-get install curl
#
# Depends on jq to parse JSON
# http://stedolan.github.io/jq/
cd /usr/bin
wget http://stedolan.github.io/jq/download/linux32/jq
chmod +x jq
#
# coinvert itself
cd /opt
git clone https://github.com/neurocis/coinvert.git
chmod +x /opt/coinvert/coinvert
ln -s /opt/coinvert/coinvert /usr/sbin/coinvert

1513014722
Hero Member
*
Offline Offline

Posts: 1513014722

View Profile Personal Message (Offline)

Ignore
1513014722
Reply with quote  #2

1513014722
Report to moderator
1513014722
Hero Member
*
Offline Offline

Posts: 1513014722

View Profile Personal Message (Offline)

Ignore
1513014722
Reply with quote  #2

1513014722
Report to moderator
1513014722
Hero Member
*
Offline Offline

Posts: 1513014722

View Profile Personal Message (Offline)

Ignore
1513014722
Reply with quote  #2

1513014722
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1513014722
Hero Member
*
Offline Offline

Posts: 1513014722

View Profile Personal Message (Offline)

Ignore
1513014722
Reply with quote  #2

1513014722
Report to moderator
neurocis
Member
**
Offline Offline

Activity: 87

Dreams are realities un-manifested.


View Profile WWW
March 01, 2014, 11:32:31 PM
 #2

<< reserved >>
Gazylion
Member
**
Offline Offline

Activity: 98



View Profile WWW
March 05, 2014, 05:42:42 PM
 #3

Awesome work. I managed to install it on Litecoin BAMT 1.2, sgminer and vertminer-thekev work, cgminer-reorder doesn't compile. On SMOS 1.3 nothing wants to compile, it shows error that there is no OpenGL instaled.

neurocis
Member
**
Offline Offline

Activity: 87

Dreams are realities un-manifested.


View Profile WWW
March 07, 2014, 01:37:10 AM
 #4

Awesome work. I managed to install it on Litecoin BAMT 1.2, sgminer and vertminer-thekev work, cgminer-reorder doesn't compile. On SMOS 1.3 nothing wants to compile, it shows error that there is no OpenGL instaled.

Thanks for the feedback, I will take a look at this, more than likely there are some dependencies missing. I have opened an issue for these.

Cheers!

neurocis.
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!