Bitcoin Forum

Alternate cryptocurrencies => Mining (Altcoins) => Topic started by: neurocis on March 01, 2014, 06:39:14 AM



Title: [ANN] - coinvert - Script to switch between script / nscrypt / keccak on BAMT
Post by: neurocis on March 01, 2014, 06:39:14 AM
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 (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



Title: Re: [ANN] - coinvert - A cgminer switcher for BAMT based on algorythm/api.
Post by: neurocis on March 01, 2014, 11:32:31 PM
<< reserved >>


Title: Re: [ANN] - coinvert - Script to switch between script / nscrypt / keccak on BAMT
Post by: Gazylion on March 05, 2014, 05:42:42 PM
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.


Title: Re: [ANN] - coinvert - Script to switch between script / nscrypt / keccak on BAMT
Post by: neurocis on March 07, 2014, 01:37:10 AM
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.