Litecoin > Mining

CPUminer failover

(1/3) > >>

xurious:
I've got a batch file created for doing failover. I've done as much testing as I can, but the pools are not going down like they used to.

Can be downloaded here: http://ltc.xurious.com/failover.bat


--- Code: ---@echo off

:Global
:: Set options - Change Retries, seconds and pool/usernames to those you desire. Make sure to include port numbers

SET retries=1
SET seconds=1

::Change TTL to how long you want to be at the secondary/tertiary pool before trying the primary. Time in milliseconds. 600000 = 1 hour, 60000 = 1 minute

SET TTL=60000

:If you would like to a specific amount of threads, remove the ":" from the next line and specify. Add "--threads=%threads%" to the end of each minerd line.

:SET threads=X

:Primary Pool

SET userpass2=
SET pool2=http://ltc.xurious.com:9332

:Secondary Pool

SET userpass1=
SET pool1=http://litecoinpool.org:9332/


:Tertiary Pool

SET userpass3=
SET pool3=

::Actualy mining part
:MINE

START /B /wait minerd.exe --retries=%RETRIES% --retry-pause=%SECONDS% --userpass=%USERPASS1% --url=%pool1%

START /B minerd.exe --retries=%RETRIES% --retry-pause=%SECONDS% --userpass=%USERPASS2% --url=%pool2%

tasklist /FI "IMAGENAME eq minerd.exe" 2>NUL | find /I /N "minerd.exe">NUL
if "%ERRORLEVEL%"=="0" PING 1.1.1.1 -n 1 -w %TTL% >NUL

TASKKILL /F /IM "minerd.exe"

START /B /wait minerd.exe --retries=%RETRIES% --retry-pause=%SECONDS% --userpass=%USERPASS1% --url=%pool1%

START /B minerd.exe --retries=%RETRIES% --retry-pause=%SECONDS% --userpass=%USERPASS3% --url=%pool3%

tasklist /FI "IMAGENAME eq minerd.exe" 2>NUL | find /I /N "minerd.exe">NUL
if "%ERRORLEVEL%"=="0" PING 1.1.1.1 -n 1 -w %TTL% >NUL

TASKKILL /F /IM "minerd.exe"

GOTO MINE

:END
--- End code ---

Greedi:
Thank you so much, i use that failover scripts now, and have tested it with some private pools, solo and p2pool, works like a dream !

xurious:
Let me know how that works. Or if you are looking for tweaks. I'm sure there is a better way of writing it. Pinging 1.1.1.1 was the only dos way I could find of waiting XX time.

Greedi:

--- Quote from: xurious on August 06, 2012, 03:18:50 AM ---Let me know how that works. Or if you are looking for tweaks. I'm sure there is a better way of writing it. Pinging 1.1.1.1 was the only dos way I could find of waiting XX time.

--- End quote ---

sure will, the only problem so far is that when a pool/connection die, there goes a bit to long time before its swich to a new pool/connection :)

xurious:

--- Quote from: Greedi on August 06, 2012, 05:41:43 AM ---sure will, the only problem so far is that when a pool/connection die, there goes a bit to long time before its swich to a new pool/connection :)

--- End quote ---

I know where the problem lies with that, just not sure how to change it in a batch file. We'll see if I find something.

Navigation

[0] Message Index

[#] Next page

Go to full version