Bitcoin Forum
May 11, 2024, 05:34:26 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: CGKILL Batchfile  (Read 1521 times)
FiatKiller (OP)
Sr. Member
****
Offline Offline

Activity: 378
Merit: 250


View Profile
December 04, 2013, 12:47:35 PM
 #1

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
------------------------------------------------------

LTC: LdxgJQLUdr8hZ79BV5AYbxkBUdaXctXAPi
MoonCoin Gambling: https://coin-horse.com/MON/
1715405666
Hero Member
*
Offline Offline

Posts: 1715405666

View Profile Personal Message (Offline)

Ignore
1715405666
Reply with quote  #2

1715405666
Report to moderator
According to NIST and ECRYPT II, the cryptographic algorithms used in Bitcoin are expected to be strong until at least 2030. (After that, it will not be too difficult to transition to different algorithms.)
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715405666
Hero Member
*
Offline Offline

Posts: 1715405666

View Profile Personal Message (Offline)

Ignore
1715405666
Reply with quote  #2

1715405666
Report to moderator
1715405666
Hero Member
*
Offline Offline

Posts: 1715405666

View Profile Personal Message (Offline)

Ignore
1715405666
Reply with quote  #2

1715405666
Report to moderator
FiatKiller (OP)
Sr. Member
****
Offline Offline

Activity: 378
Merit: 250


View Profile
December 04, 2013, 01:10:18 PM
 #2

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
-----------------------------------

LTC: LdxgJQLUdr8hZ79BV5AYbxkBUdaXctXAPi
MoonCoin Gambling: https://coin-horse.com/MON/
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!