This is a repeat and amalgamation of previous posts by others.
More options exist for folks wanting to squeeze every bit out of the modules than is frequently mentioned here.
For the record I am bfgminer/cgminer agnostic.
I use both, they are only tools and each has it's strong points.
For a unit that just boots and runs well I usually use cgminer.
For more details and manual control of each core I use BFGMiner.
KnC iffn ya reading, it would be trivial to include BOTH!!!
Please!
The rest of this post addresses bfgminer and finding details about cores.
A ???version of bfgminer can be had using bertmod.
I rarely use bertmod as I get the same and more from bfgminer.
To get latest bfgminer to run on my KnC miner I use the following method.
(there are many ways to skin this cat)
Simplest way is paste the relevant parts from this file into a file on the BBB and run it.
https://github.com/luke-jr/bfgminer/blob/bfgminer/README.ASICYou could paste the lines one at a time on the BBB and run em one at a time too.
My quirky way of doing it.
On your PC, get 'git' if needed, use git and clone the latest bfgminer code.
In Linux I cd to /usr/src before I clone the repository.
Win folks might start at the C:\ prompt and will end up with c:\bfgminer folder.
"git clone git://github.com/luke-jr/bfgminer.git"
or
"git clone
https://github.com/luke-jr/bfgminer.git"
This will clone you a local copy of the bfgminer source code.
(stick with me even if you do not compile your own on the PC)
cd into the newly created bfgminer directory (folder in Winish)
Read the file README.ASIC and look in the KnC section for instructions.
I copy and paste everything between Start and END into a file on my BBB.
Do not include the lines with Start and END.
Details of how to create a file on the BBB follow.
On the BBB SSH in as root
"cd /config"
"vi BFGMiner_ram_build"
Vi is quirky for beginners, fear not, just a few simple commands needed.
Once Vi has opened a new file hit the 'i' key (i=insert)
Copy with your mouse and highlighting, the code from the README.ASIC file.
Paste it into the vi window after hitting the 'i' key.
Save it with 'Esc Esc :wq'
Escape to get out of insert mode, an extra for good measure, the colon to tell vi a command is next, and w=write and q=quit.
If things go wrong "Esc :q!" to quit vi without writing and start over.
Once the file is created and saved.
Either
"chmod 700 BFGMiner_ram_build"
"./BFGMiner_ram_build"
OR
"source ./BFGMiner_ram_build"
This takes a while. (cgminer is still hashing away during the process)
When it finishes it will stop cgminer and start bfgminer.
On the bfgminer screen you can use "m" key to view details on each core.
Use the up and down arrows to scroll thru the cores, Enter to return to main bfgminer screen.
After about 15-30 minutes the evil cores will have high error% and 0 accepted.
Sometimes a core will show a low hashrate too.
Disable the evil ones with the "d" key.
I refrain from zeroing the stats to get long term info.
It takes longer for the error averages to come down but keeps the core info intact.
Not all high error cores are always evil, some just need bad neighbors turned off to be productive.
I turn off one(or just a few) core and watch the hashrate for changes.
Later(hour at least) you can try enabling them one at a time and watch for changes.
OPTIONAL
If/when it finishes and starts running without errors quit or SSH into a new session.
(I edit the install script to NOT auto start bfgminer)
"cd /config/bfgminer"
"cp /etc/init.d/cgminer.sh /config/bfgminer/bfgminer.sh"
This shell script runs the KnC startup routines again before starting bfgminer when you start bfgminer with the .sh file.
You will now have a choice of editors VI or NANO(nano was installed by the buildscript)
"vi /config/bfgminer/bfgminer.sh"
OR
"nano /config/bfgminer/bfgminer.sh"
change 3 lines at the top of the copy of the file
FROM
DAEMON=/usr/bin/cgminer
NAME=cgminer
DESC="Cgminer daemon"
TO
DAEMON=/config/bfgminer/bfgminer
NAME=bfgminer
DESC="BFGminer daemon"
One more line to change near the end of the file
FROM
start-stop-daemon -b -S -x screen -- -S cgminer -t cgminer -m -d "$DAEMON" --default-config /config/cgminer.confTO
start-stop-daemon -b -S -x screen -- -S bfgminer -t bfgminer -m -d "$DAEMON" --default-config /config/cgminer.confThats it, ready to run.
Stop cgminer (if it is running)
"/etc/init.d/cgminer.sh stop"
Start bfgminer in screen mode
"/config/bfgminer/bfgminer.sh start"
Now a 'screen -r" should show you bfgminer hashing away.
Lots more info is also available.
Now we can also go to our PC and install miner.php (on the PC used to monitor everything) from the (PC) bfgminer source code directory. (you need php installed already too)
Everything you never wanted to know about your cores is listed on the miner.php summary page.
***you have to use the miner.php from the bfgminer source folder as it is modified to display the excellent KnC API info only available only when using bfgminer.
(this may already be rolled into the precompiled binary zip, have not looked)
miner.php installation instructions are in ther folder with miner.php somewhere.
You will need to also make a 'myminer.php' file and put it in the same folder as the INSTALLED miner.php file.
(on my linux box it is installed in /var/www/htdocs/) <<-- yours may be different
Add a line that has you miners IP addresses.
ex:
$rigs = array('192.168.100.93:4028:Mercury','172.19.100.102:4028:Saturn','10.10.100.103:4028:Jupiter');
(it's all one long line)
Then in your PC browser just input "
/miner.php"
miner.php has a quirk or two,
bfgminer program uses letters to identify cores and the miner.php summary page uses numbers.
If you click the 'stats' button on the miner.php page you will find both Lukeish and numbers side by side for translation.
If you do choose to use miner.php you can also make custom pages.
For example I edited my 'myminer.php' file thusly (follow link)
http://codepad.org/YLQBbJEm
As stated in the beginning there are many ways to skin this cat.
If you reboot you will need to rerun the build script and redo the build.
(you could copy the build script and edit out the bfgminer download part as it is already on the machine after running it once)
There are ways around this rebuilding every time.
One way is used by latest bertmod, unzip it and have a look in the files
I also do a wierd OPTIONAL thing with the bfgminer install script.
First I create a opkg.cache directory.
"mkdir /config/opkg.cache"
then I edit the build script.
every instance(4 instances) in the file of "opkg install"
I change it to
"opkg --cache /config/opkg.cache install" (the rest of the line remains intact)
Then next time I want to build from scratch the needed pkg's are already in the cache folder instead of needing to download again.
(better ways exist but harder for me to explain)
The next bit is not recommended for those just following the recipe.
If you like adventure you can edit the driver-knc.c file and rebuild.
I tweak the 'core disable/enable strategy' constants for longer initial timeouts.
Every machine is different and no one strategy is IMneverHO ideal for all.
then rebuild with
"make AR=arm-angstrom-linux-gnueabi-ar"
I'm sure there are errors in this post, I'll edit if they are pointed out.
Hopefully the time invested in the process gains you a few Gh/s.
It will display more detail about individual cores.
As usual YMMV