Bitcoin Forum
November 21, 2017, 09:20:25 PM *
News: Latest stable version of Bitcoin Core: 0.15.1  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: « 1 ... 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 [267] 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 »
  Print  
Author Topic: [OS] nvOC easy-to-use Linux Nvidia Mining v0019-1.4  (Read 327265 times)
Stubo
Jr. Member
*
Offline Offline

Activity: 42


View Profile
November 06, 2017, 11:11:37 AM
 #5321

I have been spending a bit of time reading through all of the bash scripts that make up nvOC. I urge everybody to do that because then you will learn both how it works and how you may be to take advantage of some of the vast functionality that is offered. To make that easier to do, I found a python script "beautify_bash.py" that you can run against them (1bash, 2unix, 3main, etc.) to make them more readable.

https://github.com/ewiger/beautify_bash

It basically just reformats the code with the proper syntax indentation for loops and if statements. The first thing that I did with the 19-1.4 release the other day was to beautify all of the scripts, then make my personal miner tweaks to those versions and finally deploy those to my miners. I have found no issues from doing this. The basic steps to get it going are:

-Download the zip file to your PC, unzip it to get to beautify_bash.py
-Use WinSCP or suitable substitute to sftp it down to your rig(s) in /home/m1 directory
-Login to rig, make the script executable "chmod 750 beautify_bash.py"
-Execute against the scripts you use:
./beautify_bash.py 1bash
./beautify_bash.py 2unix
./beautify_bash.py 3main
./beautify_bash.py 4update
./beautify_bash.py IAmNotAJeep_and_Maxximus007_WATCHDOG
..etc

It will beautify the script and leave a copy of the original as <filename>~. Perhaps there is some reason for releasing the scripts with no syntax formatting as they are but I have yet to find it.

Hope this helps.

I have started to not use standard formatting with bash at all.  I wasn't really thinking about readability for others.  This script looks interesting; can probably save a lot of time when used systematically.

I would also add that it can point out problems as well. In 19-1.3, it pointed out extra fi's in 2 of the scripts. It looks like you cleaned them up for 19-1.4.
Join ICO Now A blockchain platform for effective freelancing
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1511299225
Hero Member
*
Offline Offline

Posts: 1511299225

View Profile Personal Message (Offline)

Ignore
1511299225
Reply with quote  #2

1511299225
Report to moderator
1511299225
Hero Member
*
Offline Offline

Posts: 1511299225

View Profile Personal Message (Offline)

Ignore
1511299225
Reply with quote  #2

1511299225
Report to moderator
damNmad
Full Member
***
Offline Offline

Activity: 168



View Profile
November 06, 2017, 11:22:19 AM
 #5322


Nicely done and fast as always
I just saw it last night

Thanks a lot damNmad

Thanks mate, I was following this coin from past two months (trusted it somehow), good to see its ticking every boxes now Smiley

▀     DeepOnion  |  TOR Integrated & Secured  [ Facebook  Telegram  Bitcointalk  Twitter  Youtube  Reddit ]     ▀
Your Anonymity Guaranteed  ★  Your Assets Secured by TOR  ★  Guard Your Privacy!   ❱❱❱ JOIN AIRDROP NOW!
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬  File Authenticity Guaranteed by DeepVault  ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
papampi
Full Member
***
Offline Offline

Activity: 140


Linux FOREVER! Resistance is futile!!!


View Profile
November 06, 2017, 11:45:50 AM
 #5323

Just installed this nvoc on one of my rigs, looks good. So questions though (no, I did not read all the pages..):

- Is there a way to limit telegram messages to be sent only when there is something wrong, i.e. reboot of server or miner is needed ?
- My rig has some stability issues, I am mining Ethereum with ethminer. In order to track the GPUs causing problems they would have to be run as separate instances/sessions, (xmos does this by default). Any plans for implementing such feature? If not maybe I try with claymore or plug in xmos USB stick, adjust overclock settings and copy them to nvOC.

--
Tigel


You can set telegram to no, but may lose some info, or set to high times like 1440 (once a day)
Papampi telegram will send alerts either way
dartec
Newbie
*
Offline Offline

Activity: 17


View Profile
November 06, 2017, 12:20:39 PM
 #5324

Is anyone having a problem mining with skunk algo with ccminer.
I have set it up, but can't get it to work.
I tested the syntax from the command line, and this is the result I get (I have replaced my real username with "username" in this example):

m1@m1-desktop:~$ /home/m1/TPccminer/ccminer -a skunk -o stratum+tcp://zpools.de:3300 -u username.miner1 -p x -i 22
*** ccminer 2.2 for nVidia GPUs by tpruvot@github ***
    Built with the nVidia CUDA Toolkit 8.0 64-bits

  Originally based on Christian Buchner and Christian H. project
  Include some algos from alexis78, djm34, sp, tsiv and klausT.

BTC donation address: 1AJdfCpLWPNoAMDfHF1wD5y8VgKSSTHxPo (tpruvot)

[2017-11-06 14:15:14] Starting on stratum+tcp://zPools.de:3300
[2017-11-06 14:15:14] NVML GPU monitoring enabled.
[2017-11-06 14:15:14] 2 miner threads started, using 'skunk' algorithm.
Illegal instruction
m1@m1-desktop:~$

Any help would be appreciated.


ALTCOM address AZjqxTggZEVjsf8wTXWhCrfvp6aZAu19gv
at10ti0n
Newbie
*
Offline Offline

Activity: 9


View Profile
November 06, 2017, 12:59:01 PM
 #5325

Just installed this nvoc on one of my rigs, looks good. So questions though (no, I did not read all the pages..):

- Is there a way to limit telegram messages to be sent only when there is something wrong, i.e. reboot of server or miner is needed ?
- My rig has some stability issues, I am mining Ethereum with ethminer. In order to track the GPUs causing problems they would have to be run as separate instances/sessions, (xmos does this by default). Any plans for implementing such feature? If not maybe I try with claymore or plug in xmos USB stick, adjust overclock settings and copy them to nvOC.

--
Tigel


You can set telegram to no, but may lose some info, or set to high times like 1440 (once a day)
Papampi telegram will send alerts either way

I've implemented an idea where i've reduced the number of telegram notifications by integrating with https://healthchecks.io/checks/
I have a crontab job run every 5 minutes where I curl the healthchecks.io checks:
*/5 * * * * curl -fsS --retry 3 https://hchk.io/CHECK_ID > /dev/null

And in there healthchecks.io/checks you would configure how often you would expect to be notified and when you would raise an issue. There is an integration with Telegram, where the bot can be configured to send you an message in case of ping not received during the grace period.

And then the Bali_TELEGRAM_ALERTS can be scheduled to not send messages at all, only when WATCHDOG seems appropriate.
kk003
Member
**
Offline Offline

Activity: 90


View Profile
November 06, 2017, 01:02:52 PM
 #5326

Just installed this nvoc on one of my rigs, looks good. So questions though (no, I did not read all the pages..):

- Is there a way to limit telegram messages to be sent only when there is something wrong, i.e. reboot of server or miner is needed ?
- My rig has some stability issues, I am mining Ethereum with ethminer. In order to track the GPUs causing problems they would have to be run as separate instances/sessions, (xmos does this by default). Any plans for implementing such feature? If not maybe I try with claymore or plug in xmos USB stick, adjust overclock settings and copy them to nvOC.

--
Tigel



I suggest you to read the notes and comments on /home/m1/kk003_telegram and see if its ok for your needs.
Or you can go here:
https://pastebin.com/vPnb6TKn

and see.

I guess if you leave empty var USER_CUSTOM_TIMES_TO_SEND_TELEGRAM you'll get only warnings (including warnings from IAmNotAJeep_and_Maxximus007_WATCHDOG).

Form:
Code:
USER_CUSTOM_TIMES_TO_SEND_TELEGRAM=("12:00" "18:00" "21:32")

To:
Code:
USER_CUSTOM_TIMES_TO_SEND_TELEGRAM=()

I did not do this check, hope it works for you (I think so).
Let me know if it does not and I'll fix it.

You may too set USER_CUSTOM_TIMES_TO_SEND_TELEGRAM like this:
Code:
USER_CUSTOM_TIMES_TO_SEND_TELEGRAM=("18:00")

to get a telegram once a day at 18:00 (or any other time/s of day you want)

Here is the warnings list (most of them):
Code:
# Some warning you can choose to get via telegram or not
SEND_WARNING_SYSTEM_RESTARTED="YES" # YES or NO
SEND_WARNING_XORG_RESTARTED="YES"   # YES or NO
SEND_WARNING_LOAD_AVERAGE="YES"     # YES or NO
SEND_WARNING_CHECK_DISPLAY="YES"    # YES or NO
SEND_WARNING_WHEN_NO_L_ON_SCREEN="YES"  # YES or NO     YES send a telegram when screen is not starting miner with -L (create log file)


And some info you may choose to get or not in your telegram msg:
Code:
# some information you can choose to receive or not on your telegram msg
SEND_REBOOT_REQUIRED="YES"      # YES or NO
SEND_WORKERNAME="YES"           # YES or NO
SEND_MINING_COIN="YES"          # YES or NO
SEND_MINING_ADDRESS="YES"       # YES or NO
MASK_MINING_ADDRESS="YES"       # YES or NO
SEND_MINER_EXEC_NAME="YES"      # YES or NO
SEND_MINER_EXEC_PATH="YES"      # YES or NO
SEND_MINER_UP_TIME="YES"        # YES or NO
SEND_PRIVATE_IP="YES"           # YES or NO
SEND_PUBLIC_IP="YES"            # YES or NO
MASK_PUBLIC_IP="NO"             # YES or NO
SEND_SSHD_PORT="YES"            # YES or NO
SEND_UP_SINCE="YES"         # YES or NO
SEND_UP_TIME="YES"          # YES or NO
SEND_RAM="YES"              # YES or NO
SEND_CPU_MODEL="YES"            # YES or NO
SEND_LOGGED_USERS="YES"         # YES or NO
 
CUSTOMIZE_SYSTEM_NAME=""        # "PRIVATE_IP" or "PUBLIC_IP" or "AnY CusTom nAme you want here", if empty it uses the system's hostname
                    # This is the main header you'll get in your telegram message
                    # PRIVATE_IP will use your private ip/s (remenber you may have more than one)
                    # PUBLIC_IP will use your public ip

Warnings auto-clear when system gets back to normal.
kk003
Member
**
Offline Offline

Activity: 90


View Profile
November 06, 2017, 01:24:52 PM
 #5327

Now I can see PIRL has been listed on whattomine, if you are interested to mine it, please follow the below instructions and add it :

Change the coin first in 1bash

Quote
COIN="PIRL"

Add the PIRL address & pool details in 1bash

Quote
PIRL_WORKER="$WORKERNAME"
PIRL_ADDRESS="yourPirlAddress"
PIRL_POOL="pirl.pool.sexy:6006"


Add this in 3main at right place

Quote
if [ $COIN == "PIRL" ]
then

if [ $ETHMINER_or_GENOIL_or_CLAYMORE == "GENOIL" ]
then
HCD='/home/m1/eth/Genoil-U/ethminer'

PIRLADDR="$PIRL_ADDRESS/$PIRL_WORKER"

if [ $DOT_POOL_FORMAT_or_FORWARD_SLASH_POOL_FORMAT == "DOT" ]
then
PIRLADDR="$PIRL_ADDRESS.$PIRL_WORKER"
fi

screen -dmSL miner $HCD -S $PIRL_POOL -O $PIRLADDR:x -SP 1 -U

if [ $LOCALorREMOTE == "LOCAL" ]
then
screen -r miner
fi

BITCOIN="theGROUND"

while [ $BITCOIN == "theGROUND" ]
do
sleep 60
done
fi

if [ $ETHMINER_or_GENOIL_or_CLAYMORE == "ETHMINER" ]
then
HCD='/home/m1/eth/ethminer_12dev2/ethminer'

PIRLADDR="$PIRL_ADDRESS/$PIRL_WORKER"

if [ $DOT_POOL_FORMAT_or_FORWARD_SLASH_POOL_FORMAT == "DOT" ]
then
PIRLADDR="$PIRL_ADDRESS.$PIRL_WORKER"
fi

screen -dmSL miner $HCD -S $PIRL_POOL -O $PIRLADDR:x -SP 1 -U

if [ $LOCALorREMOTE == "LOCAL" ]
then
screen -r miner
fi

BITCOIN="theGROUND"

while [ $BITCOIN == "theGROUND" ]
do
sleep 60
done
fi

if [ $ETHMINER_or_GENOIL_or_CLAYMORE == "CLAYMORE" ]
then

HCD=/home/m1/eth/$CLAYMORE_VERSION/ethdcrminer64

PIRLADDR="$PIRL_ADDRESS/$PIRL_WORKER"

if [ $DOT_POOL_FORMAT_or_FORWARD_SLASH_POOL_FORMAT == "DOT" ]
then
PIRLADDR="$PIRL_ADDRESS.$PIRL_WORKER"
fi

screen -dmSL miner $HCD -epool $PIRL_POOL -ewal $PIRLADDR -epsw x -mode 1 -allpools 1 -dbg -1 $PIRL_EXTENSION_ARGUMENTS

if [ $LOCALorREMOTE == "LOCAL" ]
then
screen -r miner
fi

BITCOIN="theGROUND"

while [ $BITCOIN == "theGROUND" ]
do
sleep 60
done
fi
fi

Nicely done and fast as always
I just saw it last night

Thanks a lot damNmad

Lots of thxs
poisonxa
Newbie
*
Offline Offline

Activity: 7


View Profile WWW
November 06, 2017, 02:56:33 PM
 #5328

To Fullzero. Hi i have a very very wierd situation going on with my "Drunken Rig" damnmad and i have tried numerous times to get it to work with no avail. The rig seems to have a mind of its own we dont know if its xorg or coolbits the culprit but it tends to Overclock some cards and some not and at a random order also it tends to control some of the power values and some not so its like it has a permission issue but it doesnt seem to want to listen regardless of what we do. can you contact me via pm or on discord to see if you can maybe connect to the rig and see whats up. Damnmad has a bunch of logs from the rig maybe they can help resolve the issue also?
damNmad
Full Member
***
Offline Offline

Activity: 168



View Profile
November 06, 2017, 03:18:08 PM
 #5329

To Fullzero. Hi i have a very very wierd situation going on with my "Drunken Rig" damnmad and i have tried numerous times to get it to work with no avail. The rig seems to have a mind of its own we dont know if its xorg or coolbits the culprit but it tends to Overclock some cards and some not and at a random order also it tends to control some of the power values and some not so its like it has a permission issue but it doesnt seem to want to listen regardless of what we do. can you contact me via pm or on discord to see if you can maybe connect to the rig and see whats up. Damnmad has a bunch of logs from the rig maybe they can help resolve the issue also?

Yeah, the thing is, his RIG throwing this Error while running 1bash;

Quote
"ERROR: The attribute 'GPUGraphicsClockOffset' specified in assignment '[gpu:0]/GPUGraphicsClockOffset[2]=175' cannot be
       assigned (it is a read-only attribute)."

His RIG is using mixed cards like 970, 1050, 1060 as well,  i tried to edit the xorg config file, but no luck, he isn't able to OC some of cards at all!

I believe, we have seen this sort of error, don't have those cards to test it personally, might need to edit the cool bits according to the card or I might be completely wrong.

▀     DeepOnion  |  TOR Integrated & Secured  [ Facebook  Telegram  Bitcointalk  Twitter  Youtube  Reddit ]     ▀
Your Anonymity Guaranteed  ★  Your Assets Secured by TOR  ★  Guard Your Privacy!   ❱❱❱ JOIN AIRDROP NOW!
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬  File Authenticity Guaranteed by DeepVault  ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
poisonxa
Newbie
*
Offline Offline

Activity: 7


View Profile WWW
November 06, 2017, 03:21:15 PM
 #5330

To Fullzero. Hi i have a very very wierd situation going on with my "Drunken Rig" damnmad and i have tried numerous times to get it to work with no avail. The rig seems to have a mind of its own we dont know if its xorg or coolbits the culprit but it tends to Overclock some cards and some not and at a random order also it tends to control some of the power values and some not so its like it has a permission issue but it doesnt seem to want to listen regardless of what we do. can you contact me via pm or on discord to see if you can maybe connect to the rig and see whats up. Damnmad has a bunch of logs from the rig maybe they can help resolve the issue also?

Yeah, the thing is, his RIG throwing this Error while running 1bash;

Quote
"ERROR: The attribute 'GPUGraphicsClockOffset' specified in assignment '[gpu:0]/GPUGraphicsClockOffset[2]=175' cannot be
       assigned (it is a read-only attribute)."

His RIG is using mixed cards like 970, 1050, 1060 as well,  i tried to edit the xorg config file, but no luck, he isn't able to OC some of cards at all!

I believe, we have seen this sort of error, don't have those cards to test it personally, might need to edit the cool bits according to the card or I might be completely wrong.

Correction i could Overclock the cards via "Nvidia Server" Manually its xorg and or cool that doesnt auto overclock on 1bash start.
crazydane
Full Member
***
Offline Offline

Activity: 126


View Profile
November 06, 2017, 03:52:58 PM
 #5331

zm 0.5.4 is out which adds some nice improvements to the telemetry interface.  I have rolled it out on all my nvOC 0019-1.4 rigs with no issues.

I know it has been discussed recently and I hope to see a way to collect data from multiple rigs and present it in a single browser window.  With the 0.5.4 update, the telemetry now looks like this:



Which I think is a nicer view into what your rigs are doing than this:



But this 2nd view does provide some nice nvOS specific data.

Some sort of dashboard view of all your rigs would be very nice.  It would of course depend on what miner(s) you're running to pull the stats to collect them into a consistent view.
JayneL
Jr. Member
*
Offline Offline

Activity: 37


View Profile
November 06, 2017, 04:01:49 PM
 #5332

Hi guys can you help me how to add more algo on SALTER_NICEHASH? I want to add cryptonight so that it can automatically switch to that algo pls tnx tnx tnx Grin

Hi Fullzero or anyone here figure it how? i tried to copy the settings of other algo and change the settings but it gets buggy and got insane income result lol

I will add looking into modifying SALFTER_NICEHASH_PROFIT_SWITCHING to work with XMR/ Cryptonight.

Yey thanks so much i will wait for it Cheesy

leenoox
Member
**
Offline Offline

Activity: 84


View Profile
November 06, 2017, 04:18:45 PM
 #5333

To Fullzero. Hi i have a very very wierd situation going on with my "Drunken Rig" damnmad and i have tried numerous times to get it to work with no avail. The rig seems to have a mind of its own we dont know if its xorg or coolbits the culprit but it tends to Overclock some cards and some not and at a random order also it tends to control some of the power values and some not so its like it has a permission issue but it doesnt seem to want to listen regardless of what we do. can you contact me via pm or on discord to see if you can maybe connect to the rig and see whats up. Damnmad has a bunch of logs from the rig maybe they can help resolve the issue also?

Yeah, the thing is, his RIG throwing this Error while running 1bash;

Quote
"ERROR: The attribute 'GPUGraphicsClockOffset' specified in assignment '[gpu:0]/GPUGraphicsClockOffset[2]=175' cannot be
       assigned (it is a read-only attribute)."

His RIG is using mixed cards like 970, 1050, 1060 as well,  i tried to edit the xorg config file, but no luck, he isn't able to OC some of cards at all!

I believe, we have seen this sort of error, don't have those cards to test it personally, might need to edit the cool bits according to the card or I might be completely wrong.

try: GPUGraphicsClockOffset[3]
gs777
Jr. Member
*
Offline Offline

Activity: 52


View Profile
November 06, 2017, 04:52:01 PM
 #5334

I installed nvoc 19 1.4 it works fine except - auto temp control
I'm constantly getting this message -

sudo: unable to resolve host 19_1_4
Power limit for GPU 00000000:0E:00.0 was set to 150.00 W from 150.00 W.

Warning: persistence mode is disabled on this device. This settings will go back to default as soon as driver unloads (e.g. last application like nvidia-smi or cuda application terminates). Run with [--help | -h] switch to get more information on how to enable persistence mode.

All done.
GPU 12, Target temp: 70, Current: 58, Diff: 12, Fan: 30, Power: 50

I've setup PL to 150W but somehow it shows Power 50
Can you help me please?
 

Open Maxximus007_AUTO_TEMPERATURE_CONTROL

find this line :

Code:
POWERLIMIT=$(echo -n $PWRLIMIT | tail -c -5 | head -c -3 )

and change it with :

Code:
POWERLIMIT=$(echo -n $PWRLIMIT | tail -c -6 | head -c -3 )

You can also edit your host name with

Code:
sudo nano /etc/hosts
sudo nano /etc/hostname

Thank you temp control is working now it shows my PL (150W)

but sudo nano /etc/hosts and sudo nano /etc/hostname shows same picture

19_1_4                                  8.6 GB/14.3 GB
/

9.4 MB Volume

Home folder
/home/m1

Which name should I change?
gs777
Jr. Member
*
Offline Offline

Activity: 52


View Profile
November 06, 2017, 04:59:28 PM
 #5335

I installed nvoc 19 1.4 it works fine except - auto temp control
I'm constantly getting this message -

sudo: unable to resolve host 19_1_4
Power limit for GPU 00000000:0E:00.0 was set to 150.00 W from 150.00 W.

Warning: persistence mode is disabled on this device. This settings will go back to default as soon as driver unloads (e.g. last application like nvidia-smi or cuda application terminates). Run with [--help | -h] switch to get more information on how to enable persistence mode.

All done.
GPU 12, Target temp: 70, Current: 58, Diff: 12, Fan: 30, Power: 50

I've setup PL to 150W but somehow it shows Power 50
Can you help me please?
 

I don't know if this will totally fix the issue but the sudo error re: host resolution can be corrected by fixing the hostname. In 19-1.4, there is an issue in that the hostname in /etc/hosts and /etc/hostname do not match. IIRC, /etc/hostname has 19_1_4 and /etc/hosts has m1-desktop. Edit one or the other or both and make them match. If you edit /etc/hostname, you will have to reboot.

Hope this helps.


Thank you for your response.
If I'm not mistaken they looks same
dbolivar
Member
**
Offline Offline

Activity: 62


View Profile
November 06, 2017, 06:30:58 PM
 #5336

Guys, is there a real-world difference between enabling or disabling GPUPowerMizer? I notice I can achieve the same overclocking values with or without this setting, getting about the same hashrates. But maybe it's good (or not!) for something... From the NVIDIA documentation, it's related to dynamic power management, but since we lock the frequencies and power limit, does it have any use? Thanks!
cryptocurrencyfreak
Newbie
*
Offline Offline

Activity: 14


View Profile
November 06, 2017, 07:21:08 PM
 #5337

Would anyone be so kind as to point me in the right direction for adding a new miner? I am interested in adding aeon-stak-nvidia
hurvajs77
Jr. Member
*
Online Online

Activity: 32


View Profile
November 06, 2017, 07:51:44 PM
 #5338

Hi Fullzero,
I've a small improvement for Nicehash mail Python switch. There is added sorting profits - I use papampi Telegram notification and script check first line from current-profit file, so information about current profit is irrelevant

Code:
#!/usr/bin/env python2.7

import urllib
import json
import subprocess
import time
import sys
import os
import datetime

# read configuration from file

cfg = json.loads(open(sys.argv[1]).read())

currency = cfg["currency"]  # what's in your wallet?
pwrcost = cfg["pwrcost"]  # currency units per kWh
min_profit = cfg["min_profit"]  # in BTC per day; halt miners if we're below this
payment_addr = cfg["payment_addr"]
miner_name = cfg["miner_name"]
# speed in GH/s
# power in kW, measured at the wall
# power_limit in watts per card
# gpu_oc & mem_oc as offsets (+/-) from card default
# fan as % (0-100); 0=automatic control
# {ADDR} and {MINER} in cmd will be substituted with payment_addr & miner_name
#
# power_limit, gpu_oc, mem_oc, and fan may be expressed as either an integer that
# is applied to all cards or as an array of integers that get applied to each
# card in turn.  This should better accomodate heterogeneous mining rigs.
performance = cfg["performance"]

os.environ["DISPLAY"] = ":0"

# do string substitutions in miner commands
for algo in performance:
    performance[algo]["cmd"] = performance[algo]["cmd"].format(ADDR=payment_addr, MINER=miner_name)

# fetch data from public APIs
exchrate = float(json.loads(urllib.urlopen("https://api.coinbase.com/v2/exchange-rates?currency=BTC").read())["data"]["rates"][currency])
rawrev = json.loads(urllib.urlopen("https://api.nicehash.com/api?method=simplemultialgo.info").read())["result"]["simplemultialgo"]

# calculate our profitability
profit = {}
for i in range(0, len(rawrev)):
    try:
        profit[rawrev[i]["name"]] = float(rawrev[i]["paying"]) * performance[rawrev[i]["name"]]["speed"] - 24.0 * performance[rawrev[i]["name"]]["power"] * pwrcost / exchrate
    except:
        pass

# sort profits
profit = sorted(profit.items(), key=lambda x: x[1], reverse=True)
log = open("current-profit", "w")
for i in profit:
    formatted = str(format(i[0], "16s") + ": " + format(i[1], ".8f") + " BTC/day (" + format(i[1] * exchrate, ".2f") + " " + currency + "/day)")
    log.write(formatted + "\n")
log.close()

# get maximum
max_profit = profit[0][1]
max_profit_algo = profit[0][0]

# exit if maximum is below minimum
if (max_profit <= min_profit):
    algo_log = open("algo-log", "a")
    algo_log.write(str(datetime.datetime.now()) + ": **NONE**\n")
    algo_log.close()
    for algo in performance:
        subprocess.call(["pkill", "-f", "^" + performance[algo]["cmd"].replace("+", "\\+")])
    sys.exit(0)

try:
    subprocess.check_output(["pgrep", "-f", "^" + performance[max_profit_algo]["cmd"].replace("+", "\\+")])
    current = 1
except:
    current = 0
if (current == 0):
    other = 0
    for algo in performance:
        try:
            subprocess.check_output(["pgrep", "-f", "^" + performance[algo]["cmd"].replace("+", "\\+")])
            other = 1
        except:
            pass

if (current == 0):
    # log a change
    algo_log = open("algo-log", "a")
    algo_log.write(str(datetime.datetime.now()) + ": " + max_profit_algo + "\n")
    algo_log.close()
    if (other == 1):
        # kill existing miners
        for algo in performance:
            subprocess.call(["pkill", "-f", "^" + performance[algo]["cmd"].replace("+", "\\+")])
        time.sleep(3)
    # update card settings
    cards = int(subprocess.check_output("nvidia-smi --query-gpu=count --format=csv,noheader,nounits".split(" ")).split("\n")[-2])
    for i in range(0, cards):
        # power limit
        if type(performance[max_profit_algo]["power_limit"]) is int:
            subprocess.call(("sudo nvidia-smi -i " + str(i) + " -pl " + str(performance[max_profit_algo]["power_limit"])).split(" "))
        else:
            subprocess.call(("sudo nvidia-smi -i " + str(i) + " -pl " + str(performance[max_profit_algo]["power_limit"][i])).split(" "))
        # core overclock
        if type(performance[max_profit_algo]["gpu_oc"]) is int:
            subprocess.call(("nvidia-settings -a [gpu:" + str(i) + "]/GPUGraphicsClockOffset[2]=" + str(performance[max_profit_algo]["gpu_oc"])).split(" "))
            subprocess.call(("nvidia-settings -a [gpu:" + str(i) + "]/GPUGraphicsClockOffset[3]=" + str(performance[max_profit_algo]["gpu_oc"])).split(" "))
        else:
            subprocess.call(("nvidia-settings -a [gpu:" + str(i) + "]/GPUGraphicsClockOffset[2]=" + str(performance[max_profit_algo]["gpu_oc"][i])).split(" "))
            subprocess.call(("nvidia-settings -a [gpu:" + str(i) + "]/GPUGraphicsClockOffset[3]=" + str(performance[max_profit_algo]["gpu_oc"][i])).split(" "))
        # memory overclock
        if type(performance[max_profit_algo]["mem_oc"]) is int:
            subprocess.call(("nvidia-settings -a [gpu:" + str(i) + "]/GPUMemoryTransferRateOffset[2]=" + str(performance[max_profit_algo]["mem_oc"])).split(" "))
            subprocess.call(("nvidia-settings -a [gpu:" + str(i) + "]/GPUMemoryTransferRateOffset[3]=" + str(performance[max_profit_algo]["mem_oc"])).split(" "))
        else:
            subprocess.call(("nvidia-settings -a [gpu:" + str(i) + "]/GPUMemoryTransferRateOffset[2]=" + str(performance[max_profit_algo]["mem_oc"][i])).split(" "))
            subprocess.call(("nvidia-settings -a [gpu:" + str(i) + "]/GPUMemoryTransferRateOffset[3]=" + str(performance[max_profit_algo]["mem_oc"][i])).split(" "))
        # fan speed
        if type(performance[max_profit_algo]["fan"]) is int:
            if (performance[max_profit_algo]["fan"] == 0):
                subprocess.call(("nvidia-settings -a [gpu:" + str(i) + "]/GPUFanControlState=0").split(" "))
            else:
                subprocess.call(("nvidia-settings -a [gpu:" + str(i) + "]/GPUFanControlState=1").split(" "))
                subprocess.call(("nvidia-settings -a [fan:" + str(i) + "]/GPUTargetFanSpeed=" + str(performance[max_profit_algo]["fan"])).split(" "))
        else:
            if (performance[max_profit_algo]["fan"][i] == 0):
                subprocess.call(("nvidia-settings -a [gpu:" + str(i) + "]/GPUFanControlState=0").split(" "))
            else:
                subprocess.call(("nvidia-settings -a [gpu:" + str(i) + "]/GPUFanControlState=1").split(" "))
                subprocess.call(("nvidia-settings -a [fan:" + str(i) + "]/GPUTargetFanSpeed=" + str(performance[max_profit_algo]["fan"][i])).split(" "))

    # launch new miner
    subprocess.call(("screen -dmS miner " + performance[max_profit_algo]["cmd"]).split(" "))
CyberGI
Newbie
*
Offline Offline

Activity: 8


View Profile
November 06, 2017, 10:55:52 PM
 #5339

All,

Apologies if this was covered somewhere in the previous 267 pages Wink but I'm having a struggle getting the .IMG to burn to a USB. I download it (tried 3 different PCs, all on Windows 10), used HDD Raw Copy and Etcher, to write the image to a 32GB Lexan (per Vosk's recommendation) and a few others and keep running into the same issue. It seems it only writes the 1hash file and nothing else. It splits the USD into two partitions, one contains the 1hash, and the other is "unformatted."

I'm sure, and kind of hoping that, I'm "missing some mundane detail." Does anyone have ideas what is going wrong?

Thanks

Joe
hawkfish007
Hero Member
*****
Offline Offline

Activity: 732


View Profile
November 06, 2017, 10:59:41 PM
 #5340

All,

Apologies if this was covered somewhere in the previous 267 pages Wink but I'm having a struggle getting the .IMG to burn to a USB. I download it (tried 3 different PCs, all on Windows 10), used HDD Raw Copy and Etcher, to write the image to a 32GB Lexan (per Vosk's recommendation) and a few others and keep running into the same issue. It seems it only writes the 1hash file and nothing else. It splits the USD into two partitions, one contains the 1hash, and the other is "unformatted."

I'm sure, and kind of hoping that, I'm "missing some mundane detail." Does anyone have ideas what is going wrong?

Thanks

Joe

have you unzipped the file?

For quality risers, splitters or 133 CFM fans, please visit my eBay listings,
http://www.ebay.com/sch/hawkfish007/m.html?_ipg=50&_sop=12&_rdc=1
Pages: « 1 ... 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 [267] 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 »
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!