Bitcoin Forum
May 12, 2024, 08:22:50 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: [ANN] - coinvert - Script to switch between script / nscrypt / keccak on BAMT  (Read 2678 times)
neurocis (OP)
Member
**
Offline Offline

Activity: 113
Merit: 23

Dreams are realities un-manifested.


View Profile WWW
March 01, 2014, 06:39:14 AM
Last edit: March 01, 2014, 11:36:59 PM by neurocis
 #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

1715545370
Hero Member
*
Offline Offline

Posts: 1715545370

View Profile Personal Message (Offline)

Ignore
1715545370
Reply with quote  #2

1715545370
Report to moderator
1715545370
Hero Member
*
Offline Offline

Posts: 1715545370

View Profile Personal Message (Offline)

Ignore
1715545370
Reply with quote  #2

1715545370
Report to moderator
1715545370
Hero Member
*
Offline Offline

Posts: 1715545370

View Profile Personal Message (Offline)

Ignore
1715545370
Reply with quote  #2

1715545370
Report to moderator
Unlike traditional banking where clients have only a few account numbers, with Bitcoin people can create an unlimited number of accounts (addresses). This can be used to easily track payments, and it improves anonymity.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715545370
Hero Member
*
Offline Offline

Posts: 1715545370

View Profile Personal Message (Offline)

Ignore
1715545370
Reply with quote  #2

1715545370
Report to moderator
1715545370
Hero Member
*
Offline Offline

Posts: 1715545370

View Profile Personal Message (Offline)

Ignore
1715545370
Reply with quote  #2

1715545370
Report to moderator
neurocis (OP)
Member
**
Offline Offline

Activity: 113
Merit: 23

Dreams are realities un-manifested.


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

<< reserved >>
Gazylion
Member
**
Offline Offline

Activity: 98
Merit: 10



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 (OP)
Member
**
Offline Offline

Activity: 113
Merit: 23

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:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!