Title: CGKILL Batchfile Post by: FiatKiller on December 04, 2013, 12:47:35 PM I came up with the following and if you are used to working with batchfiles, you should be able to use it. I've found it extremely useful because it keeps cgminer running and you no longer have to worry about a dead card and losing money while
at work. Follow the instructions in the REM lines:(you must start it BEFORE the cgminer batchfile) --------------------------------------------------- REM Requires cgminer to be run with 2>Log.txt parameter AFTER REM starting this batchfile. REM Requires statement of FILE=<name of cgminer batchfile> REM in a file called INPUT.txt REM Also, in all your different cgminer batchfiles, put a REM line to ECHO it's name to the input file like: REM ECHO FILE=cg.bat > INPUT.txt DEL Log.txt SET /A COUNT=0 :LOOP SET /A COUNT+=1 REM get name of current cgminer batchfile for /f "delims=" %%x in (INPUT.txt) do (set "%%x") REM check for dead card and restart cgminer, if so... FINDSTR /m "DEAD" Log.txt if %errorlevel%==0 ( Taskkill /IM cgminer.exe /F TIMEOUT 10 ECHO %DATE% >> RESTARTS.txt ECHO %TIME% >> RESTARTS.txt DEL Log.txt REM insert name of cgminer start batchfile after this line START CALL %FILE% ) REM Deletes Logfile every hour so that searching it is quick enough. IF "%COUNT%" == "30" ( Taskkill /IM cgminer.exe /F TIMEOUT 10 DEL Log.txt SET /A COUNT=0 REM insert name of cgminer start batchfile after this line START CALL %FILE% ) REM wait two minutes to recheck for dead card TIMEOUT 120 GOTO LOOP ------------------------------------------------------ Title: Re: CGKILL Batchfile Post by: FiatKiller on December 04, 2013, 01:10:18 PM Example cgminer batchfile using it: (the EXIT as the last line is very important)
--------------- ECHO FILE=GML_WML.bat > INPUT.txt setx GPU_MAX_ALLOC_PERCENT 100 setx GPU_USE_SYNC_OBJECTS 1 CLS COLOR 70 cgminer --scrypt -o stratum+tcp://us.wemineltc.com:80 -u xxx -p xxx --failover-only -o stratum+tcp://stratum.give-me-ltc.com:3333 -u xxx -p xxx -o http://mining-foreman.org:10341 -u xxx -p xxx --intensity 13 --worksize 256 --thread-concurrency 8192 -g 2 2>Log.txt Exit ----------------------------------- |