ADD A CPU MINER TO ETHOS--
It is simple to add a CPU miner to ethOS. A dedicated Linux Operating System (OS), ethOS is built to mine cryptocurrency with GPUs. The ethOS development team has not included a CPU miner with the system, and their support team does not offer advice for the feature. But modern CPUs can mine really well, and it is a shame not to use their mining capacity.
Traditional advice from gurus like CryptoBadger was to use the low-end CPUs like the AMD Sempron 145 (~$25-$35). If you wish to keep down hardware component cost, it is sound. But the Ryzen and Vishera multi-core CPUs rival some top-end GPUs with their mining capacity. The older 8-core Vishera CPU is now available at low-cost. A more expensive Ryzen can mine CryptoNight as well as an RX 580.
The method is simple. The Linux OS will support a CPU miner, even if the ethOS scripts will not monitor and report the CPU hash performance. We just need to add a few tweaks to ethOS. I let the CPUs mine as they do, and check their performance at the pool, or watch them with "screen" via SSH. Here is how to do it:
1) Get your ethOS rig up, running, and stabilized with your GPUs. The instructions are at "
www.ethosdistro.com/kb". The support team will help you if you need it.
2) When things are stable, you can add the CPU miner. Use the following commands to install the necessary Linux prerequisites:
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt update
sudo devtools-install
The line "sudo devtools-install" runs an ethOS internal script that installs developer necessities. It will not break ethOS.
3) Get the miner with "git", the utility is a part of ethOS. To do this, make a work directory in your home directory with "mkdir Work". Change into the work directory with the command "cd Work". Then run the following commands:
git clone
https://github.com/jayddee/cpuminer-opt.git cd cpuminer-opt
./build.sh
The line "./build.sh" will compile the CPU miner and result in an executable file . It is a fairly reliable script. The various prerequisites installed above are being put to use. When the compilation is finished successfully, you will find an executable file "cpuminer" in the directory. Test it by typing "./cpuminer -V" within the compile directory. You should get output printed to the screen that states the current cpuminer version. You can do this with your system mining on your GPUs with no problem. Next, type "./cpuminer -h > cpu-help.txt". You will then find a file "cpu-help.txt" in the directory, with explanations for all the cpuminer command line options.
4) Change back into the ethOS home directory. I install "screenie", a small utility to use "screen". The command "sudo apt install screenie" will add the helper utility to your system. If you are familiar with "screen", you may not need it.
5) Configure the CPU miner. I use a script to launch the miner, and a configuration file within the mining directory. The launch script is like this:
#!/bin/bash
cd /home/ethos/Work/cpuminer-opt
screen -dmS cpuminer ./cpuminer -c YES.conf
The configuration file needs to be in the cpuminer directory before launch. Here is my Yescrypt configuration file:
{
"url" : "stratum+tcp://yescrypt.mine.zergpool.com:6233",
"user" : "M---your-litecoin-address---",
"pass" : "workername,c=LTC",
"algo" : "yescrypt",
"threads" : "7",
"api-bind" : "0",
"statsavg" : 20,
"quiet" : false,
"debug" : false,
"protocol" : false
}
You can customize the configuration file for your pool and coin of choice. This configuration mines on 7 of 8 threads on an i7 CPU. It has 4 cores and hyperthreading.
If you have a 4-core AMD FX 4350, it may be best to set "threads" to "3", as it does not have hyperthreading. A Ryzen with 12 cores will mine with 24 threads, as it has "Simultaneous Multi-Threading" (SMT). It is advisable to mine with at least one thread unused.
Some notes-- Zergpool pays reliably in LiteCoin, but there are many other pools and configurations possible. There are other CPU miners as well, but CPUminer-Opt is a good general miner. It is optimized for various CPU architectures with assembly language.
For test purposes, you could simply cut-and-paste both the configuration file and the launch script into nano and separately save them. Be sure to add your personal LiteCoin address. If the launch script is in your home directory (mine is), be sure to use "chmod +x cpuminer.sh" after saving it. That will allow the BASH script file to execute the script commands.
6) Launch the CPU miner! In the home directory, type "./cpuminer.sh" and press enter. If the launch script and configuration files have no typographical errors, you should wind up back at the command prompt. At this point, type "screenie", or just use "screen", to display the miner's output. I like "screenie", it makes things easier.
If there is no output, check for configuration errors and typos. Eventually, it will work, as long as the miner compiled correctly and you could read the help file (a good indicator).
Whenever you need to check miner performance, log in locally or by SSH, and view the "screen" output. Sometimes pools and miners need adjustment. If you have several configuration files in the miner directory, you need only change the "*.conf" name in the launch script to change the mining algorithm.
Good luck mining... --scryptr