The new 0.3 Version of the nicehash price check script is working now.
There is only one problem:
Sometimes cudaminer (not ccminer) ist not exiting and waiting for the workers.
The script will exit the x11 failover pool because its expecting that cudaminer is ok.
I already increased the timeouts a bit but the problem is still there.
[2014-05-20 09:28:06] Stratum authentication failed
[2014-05-20 09:28:06] No (more) failover pools available, terminating.
[2014-05-20 09:28:06] workio thread dead, waiting for workers...
Is there a way or option to disable this waiting for workers in cudaminer and exit directly after stratum failed?
The best solution would be if cudaminer will not start initializing the cards or the mining process itself and exit if Stratum fails first.
So it will not disturb the running ccminer backup instance.
Thanks.
EDIT: Download Nvidia Inspector first and compile cudaminer with patch below to avoid the described problem.
nicehash.bat (execute as Administrator)
@echo off
cd C:\Users\User\Downloads\nicehash_failover_0.1
set nicehash_x11=false
set nicehash_scryptn=false
set nicehash_scrypt=false
set failover_pool=false
:loop
set hour=%time:~0,2%
if "%hour:~0,1%" == " " set hour=0%hour:~1,1%
set min=%time:~3,2%
if "%min:~0,1%" == " " set min=0%min:~1,1%
set secs=%time:~6,2%
if "%secs:~0,1%" == " " set secs=0%secs:~1,1%
set year=%date:~-4%
set month=%date:~3,2%
if "%month:~0,1%" == " " set month=0%month:~1,1%
set day=%date:~0,2%
if "%day:~0,1%" == " " set day=0%day:~1,1%
set datetimef=%year%-%month%-%day% %hour%:%min%:%secs%
if "%nicehash_x11%"=="false" if "%nicehash_scryptn%"=="false" if "%nicehash_scrypt%"=="false" (
start "nicehash_x11_test" nicehash_x11_test.bat
)
timeout 15 /NOBREAK >nul
tasklist /FI "WINDOWTITLE eq nicehash_x11_test*" 2>NUL | find /I /N "cmd.exe">NUL
if "%ERRORLEVEL%"=="0" (
set nicehash_x11=true
set failover_pool=false
echo [%datetimef%] X11 Price is good. Mining X11 on Nicehash! Overclocking settings will be set now.
taskkill /F /T /FI "WINDOWTITLE eq failover_pool*" >NUL
nvidiaInspector\nvidiaInspector.exe -setBaseClockOffset:0,0,175 -setMemoryClockOffset:0,0,-502 -setOverVoltage:0,0 -setPowerTarget:0,100 -setTempTarget:0,0,80
nvidiaInspector\nvidiaInspector.exe -setBaseClockOffset:1,0,175 -setMemoryClockOffset:1,0,-502 -setOverVoltage:1,0 -setPowerTarget:1,100 -setTempTarget:1,0,80
nvidiaInspector\nvidiaInspector.exe -setBaseClockOffset:2,0,175 -setMemoryClockOffset:2,0,-502 -setOverVoltage:2,0 -setPowerTarget:2,100 -setTempTarget:2,0,80
nvidiaInspector\nvidiaInspector.exe -setBaseClockOffset:3,0,175 -setMemoryClockOffset:3,0,-502 -setOverVoltage:3,0 -setPowerTarget:3,100 -setTempTarget:3,0,80
nvidiaInspector\nvidiaInspector.exe -setBaseClockOffset:4,0,175 -setMemoryClockOffset:4,0,-502 -setOverVoltage:4,0 -setPowerTarget:4,100 -setTempTarget:4,0,80
nvidiaInspector\nvidiaInspector.exe -setBaseClockOffset:5,0,175 -setMemoryClockOffset:5,0,-502 -setOverVoltage:5,0 -setPowerTarget:5,100 -setTempTarget:5,0,80
) else (
set nicehash_x11=false
echo [%datetimef%] X11 not started. Price is too low or already mining ScyptN or Scrypt on Nicehash.
)
if "%nicehash_x11%"=="false" if "%nicehash_scryptn%"=="false" if "%nicehash_scrypt%"=="false" (
start "nicehash_scryptn_test" nicehash_scryptn_test.bat
)
timeout 25 /NOBREAK >nul
tasklist /FI "WINDOWTITLE eq nicehash_scryptn_test*" 2>NUL | find /I /N "cmd.exe">NUL
if "%ERRORLEVEL%"=="0" (
set nicehash_scryptn=true
set failover_pool=false
echo [%datetimef%] ScryptN Price is good. Mining ScryptN on Nicehash! Overclocking settings will be set now.
taskkill /F /T /FI "WINDOWTITLE eq failover_pool*" >NUL
nvidiaInspector\nvidiaInspector.exe -setBaseClockOffset:0,0,175 -setMemoryClockOffset:0,0,350 -setOverVoltage:0,0 -setPowerTarget:0,100 -setTempTarget:0,0,80
nvidiaInspector\nvidiaInspector.exe -setBaseClockOffset:1,0,175 -setMemoryClockOffset:1,0,350 -setOverVoltage:1,0 -setPowerTarget:1,100 -setTempTarget:1,0,80
nvidiaInspector\nvidiaInspector.exe -setBaseClockOffset:2,0,175 -setMemoryClockOffset:2,0,350 -setOverVoltage:2,0 -setPowerTarget:2,100 -setTempTarget:2,0,80
nvidiaInspector\nvidiaInspector.exe -setBaseClockOffset:3,0,175 -setMemoryClockOffset:3,0,350 -setOverVoltage:3,0 -setPowerTarget:3,100 -setTempTarget:3,0,80
nvidiaInspector\nvidiaInspector.exe -setBaseClockOffset:4,0,175 -setMemoryClockOffset:4,0,350 -setOverVoltage:4,0 -setPowerTarget:4,100 -setTempTarget:4,0,80
nvidiaInspector\nvidiaInspector.exe -setBaseClockOffset:5,0,175 -setMemoryClockOffset:5,0,350 -setOverVoltage:5,0 -setPowerTarget:5,100 -setTempTarget:5,0,80
) else (
set nicehash_scryptn=false
echo [%datetimef%] ScryptN not started. Price is too low or already mining X11 or Scrypt on Nicehash.
)
if "%nicehash_x11%"=="false" if "%nicehash_scryptn%"=="false" if "%nicehash_scrypt%"=="false" (
start "nicehash_scrypt_test" nicehash_scrypt_test.bat
)
timeout 25 /NOBREAK >nul
tasklist /FI "WINDOWTITLE eq nicehash_scrypt_test*" 2>NUL | find /I /N "cmd.exe">NUL
if "%ERRORLEVEL%"=="0" (
set nicehash_scrypt=true
set failover_pool=false
echo [%datetimef%] Scrypt Price is good. Mining Scrypt on Nicehash! Overclocking settings will be set now.
taskkill /F /T /FI "WINDOWTITLE eq failover_pool*" >NUL
nvidiaInspector\nvidiaInspector.exe -setBaseClockOffset:0,0,175 -setMemoryClockOffset:0,0,350 -setOverVoltage:0,0 -setPowerTarget:0,100 -setTempTarget:0,0,80
nvidiaInspector\nvidiaInspector.exe -setBaseClockOffset:1,0,175 -setMemoryClockOffset:1,0,350 -setOverVoltage:1,0 -setPowerTarget:1,100 -setTempTarget:1,0,80
nvidiaInspector\nvidiaInspector.exe -setBaseClockOffset:2,0,175 -setMemoryClockOffset:2,0,350 -setOverVoltage:2,0 -setPowerTarget:2,100 -setTempTarget:2,0,80
nvidiaInspector\nvidiaInspector.exe -setBaseClockOffset:3,0,175 -setMemoryClockOffset:3,0,350 -setOverVoltage:3,0 -setPowerTarget:3,100 -setTempTarget:3,0,80
nvidiaInspector\nvidiaInspector.exe -setBaseClockOffset:4,0,175 -setMemoryClockOffset:4,0,350 -setOverVoltage:4,0 -setPowerTarget:4,100 -setTempTarget:4,0,80
nvidiaInspector\nvidiaInspector.exe -setBaseClockOffset:5,0,175 -setMemoryClockOffset:5,0,350 -setOverVoltage:5,0 -setPowerTarget:5,100 -setTempTarget:5,0,80
) else (
set nicehash_scrypt=false
echo [%datetimef%] Scrypt not started. Price is too low or already mining X11 or ScryptN on Nicehash.
)
if "%nicehash_x11%"=="false" if "%nicehash_scryptn%"=="false" if "%nicehash_scrypt%"=="false" if "%failover_pool%"=="false" (
start "failover_pool" failover_pool.bat
set failover_pool=true
echo [%datetimef%] Mining X11 on Failover Pool! Overclocking settings will be set now.
nvidiaInspector\nvidiaInspector.exe -setBaseClockOffset:0,0,175 -setMemoryClockOffset:0,0,-502 -setOverVoltage:0,0 -setPowerTarget:0,100 -setTempTarget:0,0,80
nvidiaInspector\nvidiaInspector.exe -setBaseClockOffset:1,0,175 -setMemoryClockOffset:1,0,-502 -setOverVoltage:1,0 -setPowerTarget:1,100 -setTempTarget:1,0,80
nvidiaInspector\nvidiaInspector.exe -setBaseClockOffset:2,0,175 -setMemoryClockOffset:2,0,-502 -setOverVoltage:2,0 -setPowerTarget:2,100 -setTempTarget:2,0,80
nvidiaInspector\nvidiaInspector.exe -setBaseClockOffset:3,0,175 -setMemoryClockOffset:3,0,-502 -setOverVoltage:3,0 -setPowerTarget:3,100 -setTempTarget:3,0,80
nvidiaInspector\nvidiaInspector.exe -setBaseClockOffset:4,0,175 -setMemoryClockOffset:4,0,-502 -setOverVoltage:4,0 -setPowerTarget:4,100 -setTempTarget:4,0,80
nvidiaInspector\nvidiaInspector.exe -setBaseClockOffset:5,0,175 -setMemoryClockOffset:5,0,-502 -setOverVoltage:5,0 -setPowerTarget:5,100 -setTempTarget:5,0,80
)
timeout 5 /NOBREAK >nul
goto loop
nicehash_scrypt_test.bat
set scrypt_BTC_Payout_Address=1GBbADETQ2FADFe5cSKEnmU8us4RptJWtn
set price=1.6
set diff=0.01
cudaminer.exe -q -o stratum+tcp://stratum.nicehash.com:3333 -u %scrypt_BTC_Payout_Address% -p p=%price%;d=%diff% -i 0 -l T5x24 -C 1 -r 0 -R 1
exit
nicehash_scryptn_test.bat
set scryptn_BTC_Payout_Address=1GBbADETQ2FADFe5cSKEnmU8us4RptJWtn
set price=1.6
set diff=0.01
cudaminer.exe -q -a scrypt:2048 -o stratum+tcp://stratum.nicehash.com:3335 -u %scryptn_BTC_Payout_Address% -p p=%price%;d=%diff% -i 0 -l T5x24 -C 1 -H 2 -r 0 -R 1
exit
nicehash_x11_test.bat
set ccminer=ccminer50.exe
set X11_BTC_Payout_Address=1GBbADETQ2FADFe5cSKEnmU8us4RptJWtn
set price=1.6
set diff=0.01
%ccminer% -q -a x11 -o stratum+tcp://stratum.nicehash.com:3336 -u %X11_BTC_Payout_Address% -p p=%price%;d=%diff% -r 0 -R 1
exit
failover_pool.bat
set ccminer=ccminer50.exe
set failover=stratum+tcp://EU.coinmine.pw:3333
set user=christian1980.3
set pass=x
%ccminer% -q -a x11 -o %failover% -u %user% -p %pass%
exit
cudaminers (version 2014-02-28) modificated cpu-miner.c (Thanks to zelante) to exit after checking stratum
https://www.dropbox.com/s/f63zcrzk4p5jy7f/cpu-miner.c