Blog : Uncategorized

How to setup a cron job in EthOS

Some electric companies charge different rates depending on the time of day. I live in California and the “peak” electric use time is from 4:00pm – 9:00pm so during those hours I wanted my mining rig to drop it’s voltage use down.

As you can see there is a 5 hour period where the voltage drops.

ethos voltage use

Doing this dropped my electricity bill by 20% while only lowering my monthly mining revenue by 5%.

To accomplish this in EthOS I created a cron job and 2 local.conf files with settings for regular and peak hours.

STEP 1
First setup your date and time settings:

ENTER:
date

OUTPUT:
11:45 AM ethos@50be22 198.18.0.76 [376.4 hash] /home/ethos # date
Wed Dec 13 11:45:38 CST 2017

STEP 2
Download ntpd

ENTER:
sudo apt install ntp

STEP 3
add “server time.google.com” to the ntp.conf file

ENTER:
sudo nano /etc/ntp.conf

Add at the bottom just before ntp.ubuntu.com

# Use Ubuntu's ntp server as a fallback.
server time.google.com
server ntp.ubuntu.com

STEP 4
Synchronize the NTP server

sudo ntpq -p

STEP 5
Create 2 different local.conf files, one for normal hours and one for peak hours. I named mine the following but you can name it whatever you want as it will copy to the name of local.conf.

ENTER:
nano /home/ethos/local_normal.conf

And one for peak hours
ENTER:
nano /home/ethos/local_peak.conf

 



STEP 6

Setup your cron jobs

ENTER:
sudo crontab -e

The first time you open a cron job file you have to select a text editor, I use nano.
Select your editor. You can always change this later by running ‘select-editor’.

1. /bin/ed
2. /bin/nano <---- I USE THIS ONE
3. /usr/bin/jmacs
4. /usr/bin/joe
5. /usr/bin/jpico
6. /usr/bin/jstar
7. /usr/bin/mcedit
8. /usr/bin/rjoe
9. /usr/bin/vim.basic
10. /usr/bin/vim.tiny

Choose 1-10 [2]:2

Your cron file will look like this:

# Edit this file to introduce tasks to be run by cron.
#
# Each task to run has to be defined through a single line
# indicating with different fields when the task will be run
# and what command to run for the task
#
# To define the time you can provide concrete values for
# minute (m), hour (h), day of month (dom), month (mon),
# and day of week (dow) or use '*' in these fields (for 'any').#
# Notice that tasks will be started based on the cron's system
# daemon's notion of time and timezones.
#
# Output of the crontab jobs (including errors) is sent through
# email to the user the crontab file belongs to (unless redirected).
#
# For example, you can run a backup of all your user accounts
# at 5 a.m every week with:
# 0 5 * * 1 tar -zcf /var/backups/home.tgz /home/
#
# For more information see the manual pages of crontab(5) and cron(8)
#
# m h dom mon dow command

I added this at the end of the cron file:

1 16 * * 1-5 cp /home/cronz/local_midday.conf /home/ethos/local.conf
2 16 * * 1-5 sudo ethos-overclock
3 16 * * 1-5 /sbin/shutdown -r now

1 20 * * 1-5 cp /home/cronz/local_entday.conf /home/ethos/local.conf
2 20 * * 1-5 sudo ethos-overclock
3 20 * * 1-5 /sbin/shutdown -r now

This is cron time syntax. The first number is the minute, the second is the hour and the last is the day of the week. Mine begins at 4:01 every Monday-Friday.
1 16 * * 1-5

The first line of code copies my local_midday.conf and overwrites the local.conf file
1 16 * * 1-5 cp /home/cronz/local_midday.conf /home/ethos/local.conf

The second line runs the ethos-overclock command:
2 16 * * 1-5 sudo ethos-overclock

Then restarts the system.
3 16 * * 1-5 /sbin/shutdown -r now

Then at 10PM the system copies back the normal conf file, overclocks, and restarts.
1 20 * * 1-5 cp /home/cronz/local_entday.conf /home/ethos/local.conf
2 20 * * 1-5 sudo ethos-overclock
3 20 * * 1-5 /sbin/shutdown -r now

I’m running an AMD rig with various Radeon cards but the main difference between my “peak” and “normal” settings were in the “pwr” and “vlt” settings and I also lower “mem”. You’ll also need to use the “safevolt disabled” command in your conf file.

DON’T COPY THESE SETTINGS THEY ARE EXAMPLE ONLY! YOURS WILL BE DIFFERENT THAN MINE!!!

NORMAL TIME SETTINGS:
safevolt disabled
cor 1075 1140 1140 1182 1182 1182 1182 1182 1168 1182 1182
mem 1750 2000 2000 2106 2106 2106 2106 2106 2106 2106 2106
vlt 902 854 854 834 834 834 834 834 842 834 834
dpm 5 4 4 5 5 5 5 5 5 5 5
pwr 87 96 96 96 96 96 96 96 96 76 79

PEAK TIME SETTINGS
safevolt disabled
mem 29572b 1750 1700 1750 2100 1900 1900 1900 1900 1900 2100 1900
vlt 29572b 814 814 814 814 814 814 814 814 814 814 814
dpm 29572b 4 4 4 4 4 4 4 4 4 4 4
pwr 29572b 87 39 39 72 79 85 70 79 54 74 76

If you are curious these are my miner Bios’

01 Ellesmere RX 570 115-C940PI0-100 Elpida
02 Baffin RX 560 xxx-xxx-xxx Unknown
03 Baffin RX 560 xxx-xxx-xxx Unknown
04 Ellesmere RX 570 MS-V34113-F4 SK Hynix
05 Ellesmere RX 570 MS-V34113-F4 SK Hynix
06 Ellesmere RX 570 115-D000PI20-100 SK Hynix
07 Ellesmere RX 470 115-D000PI20-100 SK Hynix
08 Ellesmere RX 570 115-D000PI20-100 SK Hynix
09 Ellesmere RX 570 MS-V34113-F4 SK Hynix
10 Ellesmere RX 570 MS-V34113-F4 SK Hynix
11 Ellesmere RX 470 115-D000PI20-100 SK Hynix

Ethereum Mining Rig List, Prices and Profit

Mining Rig Equipment List Pricing

$138 Motherboard
$269 Power Supply
$43 RAM
$36 Processor
$39 EthOS
$3 Power Button
$49 GPU Risers

GPUs = $1,560

$260 / GPU = $1,560 for 6

Optional Items = $97

$13 Cooling Fans
$6 Thermal Compound
$7 Sata Cables
$41 Wireless Adapter
$18 Voltage Meter
$12 8Pin Power Cable

TOTAL = $2,224 for a 160 MH/s Miner 6 GPU

160 MH/s will earn you about 0.012 ETH / Day ~ $8.25 (with ETH at $715)
This will take you 269 Days of mining to break even

But you need to factor in that this rig will run you about $3/day in electric so more like 425 days to break even.

If you go for 12 GPUs at a total cost of $3,884 for $16.50 / day – $6 /day electric that will take

375 days to break even

.

18 GPUs at a total cost of $5,644, $24.75 / day – $9 / day =

350 days to break even. This is due to the additional Power Supplies required


Motherboard

I really like this 19GPU Asus motherboard. I have yet to get the 19th slot to work (it’s the full length SATA slot) and it can be tricky at first to setup if you’re using a lot of different GPU’s. I will do another post on configuring this motherboard.

$139.99

Amazon


Power Supply

The ASUS Motherboard supports up to 3 power supplies, depending on how many GPUs you start out with you can start with just one and add more later. If you have 6 GPUs on one power supply you will want to get the 1000W or 1200W, I started out with an 850W and 4 GPUs then purchased a 1000W and then a 1200W. The 850W is technically enough to run 6 GPUs (as most pull around 105-130W) but the 1200W has a higher efficiency.

EVGA 850 W Platinum Power Supply $199.89 Amazon


RAM
You just need one 4GB Module of DDR4 RAM. Mining uses the GPU RAM.

$43.99

Amazon


Processor

The great thing about GPU mining is the minimal CPU requirements. You can literally run the rig using the slowest Celeron processor on the market.

$36.95

Amazon


EthOS

This is the operating system specially designed for mining Ethereum. It can run on a USB stick so you don’t have to purchase a hard drive. You will need to make the USB a bootable USB to load EthOS (don’t just drop the file onto the USB).

$39.99

gpuShack


Power Button

I had no idea the motherboard needed a power button. I almost sent it back thinking it was dead then realized it just needed a power button.

$3.79

Amazon


GPU Risers
There are several different GPU riser types. I like these because they have the 4Pin power plug on the side facing up. This makes it way easier when you chain 3 or 4 GPUs on the same power cable. These also have an LED light that lets you know it’s plugged in. If you find yourself running out certain power cables these have a plug for 4Pin, Sata, and 6Pin.

$49.96

Amazon


Cooling Fan

I was skeptical how effective little fans like this could be, but my GPUs were running hot and I had a big fan blowing on them. I purchased 3 packs of these (6 total) and placed them next to the GPU (blowing air away from the GPU) and amazingly it lowered the temps by 4-6 degrees, enough to lower the GPU fan and increase the GPU power efficiency. Final verdict, these little guys are actually worth their price. They’re available in 7 different colors.

$13.99 / 2 Pack

Amazon


Thermal Heatsink Compound

You won’t need this the first time you attach your CPU to the motherboard. I upgraded motherboards and swapped the CPU so I needed to use this.

$6.45

Amazon


Sata to 6Pin Power Cable

These are really handy when stringing your GPU risers on the same power cable otherwise you’ll need to use a single SATA cable per GPU.

$7.49 / 6 Pack

Amazon


Wireless Adapter

EthOS doesn’t support wifi so unless you want to run an ethernet cable to your rig you can get one of these guys to go wireless.

$41.71

Amazon


Voltage Meter

This is handy when you’re overclocking to determine the most efficient power settings. Optional but important if you really care about power use.

$18.99

Amazon


8Pin Dual GPU Power Cable

This lets you split a single GPU power cable and power 2 GPUs meaning fewer power cables needed.

$12.99

Amazon


MSI Radeon RX 570 4GB 0.11 MH/s PER 1$

This is the best card I have purchased so far, I was able to buy 4 used ones on eBay for $260 per card. They came with a BIOS mod that runs them at up to 29 MH/s

$260 – $450

eBay


ASUS Mining RX 470 4GB 0.05 MH/s PER 1$

I purchased 4 of these off Amazon at various prices ranging from $350-$450. I believe there are BIOS mods that up the hash rate but I haven’t flashed any of my card’s yet. It runs stock at around 23 MH/s. This was another example of getting the same card with 2 different BIOS versions, one is a Ellesmere RX 570 the other a 470. The both has at pretty much the same rate though.)

$388.87

Amazon


Gigabyte Radeon RX 560 4GB 0.07 MH/s PER 1$

I purchased 2 of these from NewEgg.com and I’m not sure if NewEgg is selling used GPUs but they came with different BIOS versions and hash at 2 different speeds. One hashes at 12.5 MH/s and the other at 10.5 MH/s

$169.00

NewEgg

Sapphire 11268-15-20G Radeon PULSE RX 550 4GB GDDR5 HDMI / DVI-D / DP (UEFI) PCI-E Graphics Card

https://www.amazon.com/gp/product/B078Q1691L/ref=oh_aui_detailpage_o07_s00?ie=UTF8&psc=1

$149.00

Hello world!

Welcome to WordPress. This is your first post. Edit or delete it, then start writing!