Author

Topic: DAG_cleaner script for eth mining in windows... (Read 718 times)

sr. member
Activity: 428
Merit: 250

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.
legendary
Activity: 2450
Merit: 1002
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.
full member
Activity: 221
Merit: 100
What language is it? How do we compile the file. I would like to use that feature as my hard disk is quite small.
legendary
Activity: 2450
Merit: 1002
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

Jump to: