mirror of
https://github.com/funkypenguin/geek-cookbook/
synced 2025-12-16 19:21:53 +00:00
Updated minerhotel
This commit is contained in:
@@ -8,7 +8,7 @@ So, you have GPUs. You can mine cryptocurrency. But **what** cryptocurrency shou
|
|||||||
1. You could manually keep track of [whattomine](http://whattomine.com/), and launch/stop miners based on profitability/convenience, as you see fit.
|
1. You could manually keep track of [whattomine](http://whattomine.com/), and launch/stop miners based on profitability/convenience, as you see fit.
|
||||||
2. You can automate the process of mining the most profitable coin based on your GPUs' capabilities and the current market prices, and do better things with your free time! (_[receiving alerts](/recipies/crytominer/monitor/), of course, if anything stops working!_)
|
2. You can automate the process of mining the most profitable coin based on your GPUs' capabilities and the current market prices, and do better things with your free time! (_[receiving alerts](/recipies/crytominer/monitor/), of course, if anything stops working!_)
|
||||||
|
|
||||||
This recipe covers option #2 :)
|
This recipe covers option #2 😁
|
||||||
|
|
||||||
[Miner hotel](http://minerhotel.com/) is a collection of scripts and config files to fully automate your mining across AMD or Nvidia cards.
|
[Miner hotel](http://minerhotel.com/) is a collection of scripts and config files to fully automate your mining across AMD or Nvidia cards.
|
||||||
|
|
||||||
@@ -16,6 +16,7 @@ This recipe covers option #2 :)
|
|||||||
## Ingredients
|
## Ingredients
|
||||||
|
|
||||||
* [Latest Minerhotel release](http://minerhotel.com/download.html) for Linux
|
* [Latest Minerhotel release](http://minerhotel.com/download.html) for Linux
|
||||||
|
* Time and patience
|
||||||
|
|
||||||
## Preparation
|
## Preparation
|
||||||
|
|
||||||
@@ -54,10 +55,50 @@ For the whattomine bot to select the most profitable coin to mine for **your** G
|
|||||||
|
|
||||||
### Test miners
|
### Test miners
|
||||||
|
|
||||||
Before trusting the whattomine service to launch your miners, test each one first by starting them manually, and then checking their status.
|
Before trusting the whattomine service to automatically launch your miners, test each one first by starting them manually, and then checking their status.
|
||||||
|
|
||||||
For example, to test the **miner-amd-eth-ethhash-ethermine** miner, run
|
For example, to test the **miner-amd-eth-ethhash-ethermine** miner, run
|
||||||
|
|
||||||
1. ```systemctl start miner-amd-eth-ethhash-ethermine.service``` to start the service
|
1. ```systemctl start miner-amd-eth-ethhash-ethermine.service``` to start the service
|
||||||
2. And then watch the output by running ```journalctl -u miner-amd-eth-ethhash-ethermine -f```
|
2. And then watch the output by running ```journalctl -u miner-amd-eth-ethhash-ethermine -f```
|
||||||
3. When you're satisfied it's working correctly (_without errors and with a decent hashrate_), stop the miner again by running ```systemctl stop miner-amd-eth-ethhash-ethermine```, and move onto testing the next one.
|
3. When you're satisfied it's working correctly (_without errors and with a decent hashrate_), stop the miner again by running ```systemctl stop miner-amd-eth-ethhash-ethermine```, and move onto testing the next one.
|
||||||
|
|
||||||
|
## Serving
|
||||||
|
|
||||||
|
### Launch whattomine
|
||||||
|
|
||||||
|
Finally, run ```systemctl start minerhotel-whattomine``` and then ```journalctl -u minerhotel-whattomine -f``` to watch the output. Within a minute, you should see whattomime launching the most profitable miner, as illustrated below:
|
||||||
|
|
||||||
|
```
|
||||||
|
Jan 29 13:49:38 kvm.funkypenguin.co.nz whattomine-linux[2057]: 2018-01-29T13:49:38+1300 <INF> whattomine.js Loading whattominebot
|
||||||
|
Jan 29 13:49:38 kvm.funkypenguin.co.nz whattomine-linux[2057]: 2018-01-29T13:49:38+1300 <INF> whattomine.js Starting whattominebot now.
|
||||||
|
Jan 29 13:50:45 kvm.funkypenguin.co.nz whattomine-linux[2057]: 2018-01-29T13:50:45+1300 <INF> whattomine.js Mining Ethereum|ETH|Ethash|0.0089|0.00093|100
|
||||||
|
Jan 29 13:50:45 kvm.funkypenguin.co.nz whattomine-linux[2057]: 2018-01-29T13:50:45+1300 <INF> whattomine.js Could not find a miner for Ubiq.
|
||||||
|
Jan 29 13:51:39 kvm.funkypenguin.co.nz whattomine-linux[2057]: 2018-01-29T13:51:39+1300 <INF> whattomine.js Mining Ethereum|ETH|Ethash|0.0089|0.00094|100
|
||||||
|
Jan 29 13:51:39 kvm.funkypenguin.co.nz whattomine-linux[2057]: 2018-01-29T13:51:39+1300 <INF> whattomine.js Could not find a miner for Ubiq.
|
||||||
|
```
|
||||||
|
|
||||||
|
!!! note
|
||||||
|
The messages about "Could not find miner" can be ignored, they indicate that one of the preferred coins on whattomine does not have a miner defined.
|
||||||
|
|
||||||
|
To make whattomine start automatically in future, run ```systemctl enable minerhotel-whattomine```
|
||||||
|
|
||||||
|
## Continue your adventure
|
||||||
|
|
||||||
|
Now, continue to the next stage of your grand mining adventure:
|
||||||
|
|
||||||
|
1. Build your [mining rig](/recipies/cryptominer/mining-rig/) 💻
|
||||||
|
2. Setup your [AMD](/recipies/cryptominer/amd-gpu/) or [Nvidia](/recipies/cryptominer/nvidia-gpu/) GPUs 🎨
|
||||||
|
3. Setup your miners with Miner Hotel] 🏨 (This page)
|
||||||
|
4. Send your coins to [exchanges](/recipies/cryptominer/exchange/) or [wallets](/recipies/cryptominer/wallet/) 💹
|
||||||
|
5. [Monitor](/recipies/cryptominer/monitor/) your empire :heartbeat:
|
||||||
|
6. [Profit](/recipies/cryptominer/profit/)! 💰
|
||||||
|
|
||||||
|
|
||||||
|
## Chef's Notes
|
||||||
|
|
||||||
|
### Tip your waiter (donate) 👏
|
||||||
|
|
||||||
|
Did you receive excellent service? Want to make your waiter happy? (_..and support development of current and future recipes!_) See the [support](/support/) page for (_free or paid)_ ways to say thank you! 👏
|
||||||
|
|
||||||
|
### Your comments? 💬
|
||||||
|
|||||||
@@ -1,88 +1,5 @@
|
|||||||
# Monitor
|
# Monitor
|
||||||
|
|
||||||
<<<<<<< Updated upstream
|
|
||||||
!!! warning
|
|
||||||
This is not a complete recipe - it's a component of the [cryptominer](/recipies/cryptominer/) "_uber-recipe_", but has been split into its own page to reduce complexity.
|
|
||||||
|
|
||||||
So, you're a miner! But if you're not **actively** mining, are you still a miner? This page details how to **measure** your mining activity, and how to raise an alert when a profit-affecting issue affects your miners.
|
|
||||||
|
|
||||||
## Ingredients
|
|
||||||
|
|
||||||
1. [InfluxDB+Grafana](https://www.funkypenguin.co.nz/note/adding-custom-data-to-influxdb-and-grafana/) instance, for visualising data
|
|
||||||
2. [Icinga](https://www.icinga.com/), [Nagios](https://www.nagios.org/) etc for alarming on GPU/miner status
|
|
||||||
3. [Asi MPM](https://www.asimpm.com/) (iOS) for monitoring your miner/pool status
|
|
||||||
4. [Altpocket](https://altpocket.io/?ref=ilVqdeWbAv), [CoinTracking](https://cointracking.info?ref=F560640), etc for managing your crypto-asset portfolio (_referral links_)
|
|
||||||
|
|
||||||
## Preparation
|
|
||||||
|
|
||||||
### Visualising performance
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
Since [Minerhotel](/recipies/crytominer/minerhotel/) switches currency based on what's most profitable in the moment, it's hard to gauge the impact of changes (overclocking, tweaking, mining pools) over time.
|
|
||||||
|
|
||||||
I hacked up a bash script which grabs performance data from the output of the miners, and throws it into an InfluxDB database, which can then be visualized using Grafana.
|
|
||||||
|
|
||||||
Here's an early version of the script (_it's since been updated for clockspeed and power usage too_):
|
|
||||||
|
|
||||||
<script src="https://gist.github.com/funkypenguin/5ec0581389be20ea6512e4c2bafb2a89.js"></script>
|
|
||||||
|
|
||||||
!!! tip
|
|
||||||
I share (_with my [patreon patrons](https://www.patreon.com/funkypenguin)_) a private "_premix_" git repository, which includes up-to-date versions of the InfluxDB /Grafana script mentioned above, as well as pre-setup Grafana graphs, so that patrons can simply "_git pull_" and start monitoring 👍
|
|
||||||
|
|
||||||
|
|
||||||
### Alarming on failure
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
GPU mining can fail in subtle ways. On occasion, I've tweaked my GPUs to the point that the miner will start, but one or all GPUs will report a zero hash rate. I wanted to be alerted to such profit-affecting issues, so I wrote a bash script (_intended to be executed by NRPE from Icinga, Nagios, etc_).
|
|
||||||
|
|
||||||
The script tests the output of the currently active miner, and ensures the GPUs have a valid hashrate.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
!!! tip
|
|
||||||
I share (_with my [patreon patrons](https://www.patreon.com/funkypenguin)_) a private "_premix_" git repository, which includes up-to-date versions of the Icinga scripts mentioned above, so that patrons can simply "_git pull_" and start monitoring 👍
|
|
||||||
|
|
||||||
### Monitoring pool/miner status
|
|
||||||
|
|
||||||
I've tried several iOS apps for monitoring my performance across various. The most useful app I've found thus far is [Asi MPM](https://www.asimpm.com/). It requires a little upfront effort to configure for all your coins/pools, but thereafter it's a handy way to keep tabs on your new obsession!
|
|
||||||
|
|
||||||
### Track your portfolio
|
|
||||||
|
|
||||||
Now that you've got your coins happily cha-chinging into you wallets (and potentially various exchanges), you'll want to monitor the performance of your portfolio over time.
|
|
||||||
|
|
||||||
There's a detailed breakdown of porfolio-management apps [here](https://www.cryptostache.com/2017/11/10/keeping-track-cryptocurrency-portfolio-best-apps-2017/).
|
|
||||||
|
|
||||||
Personally, I use:
|
|
||||||
|
|
||||||
* [Altpocket](https://altpocket.io/?ref=ilVqdeWbAv) (A free web app which can auto-sync with certain exchanges and wallets)
|
|
||||||
* [CoinTracking](https://cointracking.info?ref=F560640) - The top crypto-portfolio manager, by far. But it's expensive when you get to > 200 trades. You get what you pay for ;)
|
|
||||||
|
|
||||||
!!! note
|
|
||||||
Both of the links above are referral links. I get some goodies when you use them.
|
|
||||||
|
|
||||||
## Continue your adventure
|
|
||||||
|
|
||||||
Now, continue to the next stage of your grand mining adventure:
|
|
||||||
|
|
||||||
1. Build your [mining rig](/recipies/cryptominer/mining-rig/) 💻
|
|
||||||
2. Setup your [AMD](/recipies/cryptominer/amd-gpu/) or [Nvidia](/recipies/cryptominer/nvidia-gpu/) GPUs 🎨
|
|
||||||
3. Setup your miners with [Miner Hotel](/recipies/cryptominer/minerhotel/) 🏨
|
|
||||||
4. Send your coins to [exchanges](/recipies/cryptominer/exchange/) or [wallets](/recipies/cryptominer/wallet/) 💹
|
|
||||||
5. Monitor your empire :heartbeat: (_this page_)
|
|
||||||
6. [Profit](/recipies/cryptominer/profit/)! 💰
|
|
||||||
|
|
||||||
## Chef's Notes
|
|
||||||
|
|
||||||
1. Ultimately I hope to move all the configuration / mining executables into docker containers, but for now, they're running on a CentOS7 host for direct access to GPUs. (Apparently it _may_ be possible to pass-thru the GPUs to docker containers, but I wanted stability first, before abstracting my hardware away from my miners)
|
|
||||||
|
|
||||||
### Tip your waiter (donate) 👏
|
|
||||||
|
|
||||||
Did you receive excellent service? Want to make your waiter happy? (_..and support development of current and future recipes!_) See the [support](/support/) page for (_free or paid)_ ways to say thank you! 👏
|
|
||||||
|
|
||||||
### Your comments? 💬
|
|
||||||
=======
|
|
||||||

|

|
||||||
|
|
||||||
## Monitor your GPUs
|
## Monitor your GPUs
|
||||||
|
|||||||
@@ -49,6 +49,8 @@ reboot
|
|||||||
|
|
||||||
## Overclock
|
## Overclock
|
||||||
|
|
||||||
|
### Preparation
|
||||||
|
|
||||||
!!! warning
|
!!! warning
|
||||||
Like overclocking itself, this process is still a work in progress. YMMV.
|
Like overclocking itself, this process is still a work in progress. YMMV.
|
||||||
|
|
||||||
@@ -59,3 +61,103 @@ The following command: configures X11 for a "fake" screen so that X11 will run,
|
|||||||
```
|
```
|
||||||
nvidia-xconfig -a --allow-empty-initial-configuration --cool-bits=28 --use-display-device="DFP-0" --connected-monitor="DFP-0" --enable-all-gpus --separate-x-screens
|
nvidia-xconfig -a --allow-empty-initial-configuration --cool-bits=28 --use-display-device="DFP-0" --connected-monitor="DFP-0" --enable-all-gpus --separate-x-screens
|
||||||
```
|
```
|
||||||
|
|
||||||
|
!!! note
|
||||||
|
The script below was taken from https://github.com/Cyclenerd/ethereum_nvidia_miner
|
||||||
|
|
||||||
|
Make a directory for your overclocking script. Mine happens to be /root/overclock/, but use whatever you like.
|
||||||
|
|
||||||
|
Create settings.conf as follows:
|
||||||
|
|
||||||
|
```
|
||||||
|
# Known to work with Nvidia 1080ti, but probably not optimal. It's an eternal work-in-progress.
|
||||||
|
MY_WATT="200"
|
||||||
|
MY_CLOCK="100"
|
||||||
|
MY_MEM="400"
|
||||||
|
MY_FAN="60"
|
||||||
|
```
|
||||||
|
|
||||||
|
Then create nvidia-overclock.sh as follows:
|
||||||
|
|
||||||
|
```
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
#
|
||||||
|
# nvidia-overclock.sh
|
||||||
|
# Author: Nils Knieling - https://github.com/Cyclenerd/ethereum_nvidia_miner
|
||||||
|
#
|
||||||
|
# Overclocking with nvidia-settings
|
||||||
|
#
|
||||||
|
|
||||||
|
# Load global settings settings.conf
|
||||||
|
if ! source ~/overclock/settings.conf; then
|
||||||
|
echo "FAILURE: Can not load global settings 'settings.conf'"
|
||||||
|
exit 9
|
||||||
|
fi
|
||||||
|
|
||||||
|
export DISPLAY=:0
|
||||||
|
|
||||||
|
# Graphics card 1 to 6
|
||||||
|
for MY_DEVICE in {0..5}
|
||||||
|
do
|
||||||
|
# Check if card exists
|
||||||
|
if nvidia-smi -i $MY_DEVICE >> /dev/null 2>&1; then
|
||||||
|
nvidia-settings -a "[gpu:$MY_DEVICE]/GPUPowerMizerMode=1"
|
||||||
|
# Fan speed
|
||||||
|
nvidia-settings -a "[gpu:$MY_DEVICE]/GPUFanControlState=1"
|
||||||
|
nvidia-settings -a "[fan:$MY_DEVICE]/GPUTargetFanSpeed=$MY_FAN"
|
||||||
|
# Graphics clock
|
||||||
|
nvidia-settings -a "[gpu:$MY_DEVICE]/GPUGraphicsClockOffset[3]=$MY_CLOCK"
|
||||||
|
# Memory clock
|
||||||
|
nvidia-settings -a "[gpu:$MY_DEVICE]/GPUMemoryTransferRateOffset[3]=$MY_MEM"
|
||||||
|
# Set watt/powerlimit. This is also set in miner.sh at autostart.
|
||||||
|
sudo nvidia-smi -i "$MY_DEVICE" -pl "$MY_WATT"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo "Done"
|
||||||
|
echo
|
||||||
|
```
|
||||||
|
|
||||||
|
### Start your engine!
|
||||||
|
|
||||||
|
**Once** you've got X11 running correctly, execute ,/nvidia-overclock.sh, and you should see something like the following:
|
||||||
|
|
||||||
|
```
|
||||||
|
[root@kvm overclock]# ./nvidia-overclock.sh
|
||||||
|
Attribute 'GPUPowerMizerMode' (kvm.funkypenguin.co.nz:0[gpu:0]) assigned value 1.
|
||||||
|
Attribute 'GPUFanControlState' (kvm.funkypenguin.co.nz:0[gpu:0]) assigned value 1.
|
||||||
|
Attribute 'GPUTargetFanSpeed' (kvm.funkypenguin.co.nz:0[fan:0]) assigned value 60.
|
||||||
|
Attribute 'GPUGraphicsClockOffset' (kvm.funkypenguin.co.nz:0[gpu:0]) assigned value 100.
|
||||||
|
Attribute 'GPUMemoryTransferRateOffset' (kvm.funkypenguin.co.nz:0[gpu:0]) assigned value 400.
|
||||||
|
|
||||||
|
Power limit for GPU 00000000:04:00.0 was set to 150.00 W from 150.00 W.
|
||||||
|
All done.
|
||||||
|
|
||||||
|
Done
|
||||||
|
|
||||||
|
[root@kvm overclock]#
|
||||||
|
```
|
||||||
|
|
||||||
|
Play with changing your settings.conf file until you break it, and then go back one revision :)
|
||||||
|
|
||||||
|
## Continue your adventure
|
||||||
|
|
||||||
|
Now, continue to the next stage of your grand mining adventure:
|
||||||
|
|
||||||
|
1. Build your [mining rig](/recipies/cryptominer/mining-rig/) 💻
|
||||||
|
2. Setup your [AMD](/recipies/cryptominer/amd-gpu/) or Nvidia (_this page_) GPUs 🎨
|
||||||
|
3. Setup your miners with [Miner Hotel](/recipies/cryptominer/minerhotel/) 🏨
|
||||||
|
4. Send your coins to [exchanges](/recipies/cryptominer/exchange/) or [wallets](/recipies/cryptominer/wallet/) 💹
|
||||||
|
5. [Monitor](/recipies/cryptominer/monitor/) your empire :heartbeat:
|
||||||
|
6. [Profit](/recipies/cryptominer/profit/)! 💰
|
||||||
|
|
||||||
|
|
||||||
|
## Chef's Notes
|
||||||
|
|
||||||
|
### Tip your waiter (donate) 👏
|
||||||
|
|
||||||
|
Did you receive excellent service? Want to make your waiter happy? (_..and support development of current and future recipes!_) See the [support](/support/) page for (_free or paid)_ ways to say thank you! 👏
|
||||||
|
|
||||||
|
### Your comments? 💬
|
||||||
|
|||||||
Reference in New Issue
Block a user