Bitcoin Forum

Alternate cryptocurrencies => Mining (Altcoins) => Topic started by: GenTarkin on April 01, 2016, 09:43:42 PM



Title: DAG_cleaner script for eth mining in windows...
Post by: GenTarkin on April 01, 2016, 09:43:42 PM
Simple, Auto-It script works, it can be compiled into a .exe for ease of use:
It just deletes everything except current used DAG and the newest DAG(one going to be used).
I made it because newest genoil ethminer crashes whenever I try to set the autodag deletion feature. On 12 different rigs it crashes =(
Code:
#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Icon=..\Program Files (x86)\AutoIt3\Icons\MyAutoIt3_Blue.ico
#AutoIt3Wrapper_Change2CUI=y
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****


$DAGDIR=FileGetShortName(@LocalAppDataDir & "\ethash")
$DAGDIRCUST=FileGetShortName(@HomeDrive & "\ethash")

While 1
Sleep(2 * 60 * 1000)
ConsoleWrite("Deleting unused DAG files..." & @CRLF)
;FileDelete($DAGDIR & "\*")
;FileDelete($DAGDIRCUST & "\*")
_DeleteDAG($DAGDIR)
_DeleteDAG($DAGDIRCUST)
ConsoleWrite("Deletion complete" & @CRLF)
Sleep(1 * 24 * 60 * 60 * 1000)
WEnd

Func _DeleteDAG($dir)
local $search = FileFindFirstFile($dir & "\*")
local $locked, $prevtime, $curtime
local $newest = 0
local $newestfilename
While 1
$file = FileFindNextFile($search)
;ConsoleWrite($file & @CRLF)
if @error then ExitLoop

$curtime = FileGetTime($dir & "\" & $file, 0, 1)
if $curtime > $newest Then
$newest = $curtime
$newestfilename = $file
EndIf


WEnd
FileClose($search)
$search=""

$search = FileFindFirstFile($dir & "\*")
While 1
$file = FileFindNextFile($search)
if @error then ExitLoop
if $file == $newestfilename then ContinueLoop
FileDelete($dir & "\" & $file)
WEnd
FileClose($search)

EndFunc



Title: Re: DAG_cleaner script for eth mining in windows...
Post by: Bazelak on April 02, 2016, 05:43:46 AM
What language is it? How do we compile the file. I would like to use that feature as my hard disk is quite small.


Title: Re: DAG_cleaner script for eth mining in windows...
Post by: GenTarkin on April 07, 2016, 02:51:45 PM
Language is autoit. It can be compiled by downloading autoit. I can make the .exe, I will make it available soon =)

I may, also add auto miner reboot when a new dag goes live, I notice many miners fail to switch over to it properly.


Title: Re: DAG_cleaner script for eth mining in windows...
Post by: Narosya on April 07, 2016, 08:16:28 PM

I may, also add auto miner reboot when a new dag goes live, I notice many miners fail to switch over to it properly.

Does that include the qtminer or the ethminer modified by Genoil? I use both to mine and do not see that.