Bitcoin Forum

Bitcoin => Mining support => Topic started by: Sebz4n on June 16, 2011, 10:39:21 AM



Title: Auto re-starting miner every 10 minutes!
Post by: Sebz4n on June 16, 2011, 10:39:21 AM
Hey guys!

I keep getting this "Verification Fail, Check Hardware" error quite often, so my GPUs waste a lot of precious mining time :( This failure is often solved for a while by restarting GUIMiner, so I made a batch that does just that!

So now my GUIMiner restarts itself every 5 minutes, with a pause on 5 seconds (5 seconds cool-off time every 10 minutes), and it does so minimized, but I have a question:

How do I make the cmd window disappear? I can run it stealth via a vbs script:

Set WshShell = CreateObject("WScript.Shell")
WshShell.Run chr(34) & "G:\Users\Sebz4n_GAME_OS2\Desktop\Restart GUIMiner.bat" & Chr(34), 0

But a window still opens and appears for 0.2 seconds or so, which I wanna remove, how do I do that?

Thank you


Title: Re: Auto re-starting miner every 10 minutes!
Post by: Freakin on June 16, 2011, 04:13:23 PM
you can use AT to run a script hidden and schedulded


Title: Re: Auto re-starting miner every 10 minutes!
Post by: Sebz4n on June 17, 2011, 10:15:27 AM
you can use AT to run a script hidden and schedulded

AT?


Title: Re: Auto re-starting miner every 10 minutes!
Post by: Jack of Diamonds on June 17, 2011, 10:22:55 AM
you can use AT to run a script hidden and schedulded

AT?

http://www.computerhope.com/unix/uat.htm


Title: Re: Auto re-starting miner every 10 minutes!
Post by: Sebz4n on June 17, 2011, 12:37:08 PM
I have more or less gotten this to work, using these two things:

.vbs script that runs the batch silently:
Code:
Set WshShell = CreateObject("WScript.Shell")
WshShell.Run chr(34) & "G:\Users\Sebz4n_GAME_OS2\Desktop\Restart GUIMiner.bat" & Chr(34), 0
Set WshShell = Nothing

.bat file that is run silently by the .vbs script:
Code:
start TASKKILL /F /IM "guiminer.exe"
start TASKKILL /F /IM "poclbm.exe"
PING 1.1.1.1 -n 1 -w 1000 > NUL
start /d "G:\Users\Sebz4n_GAME_OS2\Desktop\GUIMiner\" miner.lnk

Now, the problem I have left, is that the taskkiller commands gives some kind of "feedback" in a new dos window, it pops up so fast, that I can't read what it says, but it's something regarding the program PID's not being found (it does work as inteded however)!

I've tried to make the taskkillers output the "feedback" into a log file like this, but it doesn't work (It does make an empty log file), so I suspect it's because they open a new dos:
Code:
start TASKKILL /F /IM "guiminer.exe" > testlog1.txt
start TASKKILL /F /IM "poclbm.exe" > testlog1.txt
PING 1.1.1.1 -n 1 -w 1000 > NUL
start /d "G:\Users\Sebz4n_GAME_OS2\Desktop\GUIMiner\" miner.lnk

Can you force them to write in the current dos? Or is there another way?
I don't understand the AT script's I'm afraid, so this seems easier


Title: Re: Auto re-starting miner every 10 minutes!
Post by: Freakin on June 17, 2011, 07:14:45 PM
AT for windows
http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/at.mspx?mfr=true


Title: Re: Auto re-starting miner every 10 minutes!
Post by: Sebz4n on June 17, 2011, 07:56:09 PM
The issue is that the taskkiller command returns some kind of feedback in a new dos window, saying something like "The PID was not found" - I need to disable or hide this feedback, not use AT script.


Title: Re: Auto re-starting miner every 10 minutes!
Post by: Freakin on June 17, 2011, 08:20:07 PM
ditch the batch & vbs to kick it off and do the whole thing in autohotkey

very easy to use and run commands hidden, and has built in timers, etc.

the Process command takes care of killing the task

http://www.autohotkey.com/docs/commands/Process.htm

autohotkey really is an incredibly functional scripting language

not tested, but this should basically work.  timer is in milliseconds. 
if you have a problem running the shortcut file directly just link directly to the exe.  Also i made it sleep for 1 second after closing processes.  You could also use "WaitClose" instead of "Close" to make it wait for the applicaiton to close before proceeding
Code:
#Persistent
SetTimer, RestartMiner, 600000
Return

RestartMiner:
Process, Close, poclbm.exe
Process, Close, guiminer.exe
Sleep, 1000
Run Powershell.exe G:\Users\Sebz4n_GAME_OS2\Desktop\GUIMiner\miner.lnk
Return


Title: Re: Auto re-starting miner every 10 minutes!
Post by: Sebz4n on June 17, 2011, 08:38:22 PM
Doesn't work, powershell.exe opens like every second (in a dos window, so that won't help) :(
Tried setting all timer listed to 99999999 but no difference, also edited to WaitClose but that didn't work either


Title: Re: Auto re-starting miner every 10 minutes!
Post by: Freakin on June 17, 2011, 08:58:40 PM
haha whoops take out the powershell.exe part.  you dont' need that.  that was muscle memory kicking in before I copy/pasted your shortcut link

i just tested this with my batch file that runs cmdlink phoenix miner and it worked great w/ 30 second timer

Here's exactly what I used for my test

Code:
#Persistent
SetTimer, RestartMiner, 30000
Return

RestartMiner:
Process, Close, phoenix.exe
Sleep, 1000
Run C:\bitcoin\phoenix-1.48\Namecoin_bitparking.bat, c:\bitcoin\phoenix-1.48,
Return


Title: Re: Auto re-starting miner every 10 minutes!
Post by: Sebz4n on June 18, 2011, 03:30:18 PM
Doesn't close process, also still opens a dos window :(


Title: Re: Auto re-starting miner every 10 minutes!
Post by: Freakin on June 18, 2011, 07:06:44 PM
you did change the process name from my example, right?  I don't use guiminer or poclbm, and i use a batch file to start my mining.

for you, add in your other "process, close" like in the first example, then change the run command to your shortcut

if it still pops up a window from running your link then at the end of the line after the 2nd command, put in "hide"

like

Run G:\Users\Sebz4n_GAME_OS2\Desktop\GUIMiner\miner.lnk,, Hide



Title: Re: Auto re-starting miner every 10 minutes!
Post by: phelix on June 20, 2011, 11:07:03 AM
Hey guys!

I keep getting this "Verification Fail, Check Hardware" error quite often, so my GPUs waste a lot of precious mining time :( This failure is often solved for a while by restarting GUIMiner, so I made a batch that does just that!


probably your cards run too high. by restarting you give them a little time to cool.

restarting periodically is a really bad idea imho. try better cooling / spacers / lower mem clock / lower core clock ...


Title: Re: Auto re-starting miner every 10 minutes!
Post by: Sebz4n on June 20, 2011, 01:03:25 PM
Hey guys!

I keep getting this "Verification Fail, Check Hardware" error quite often, so my GPUs waste a lot of precious mining time :( This failure is often solved for a while by restarting GUIMiner, so I made a batch that does just that!


probably your cards run too high. by restarting you give them a little time to cool.

restarting periodically is a really bad idea imho. try better cooling / spacers / lower mem clock / lower core clock ...

Not gonna invest in better cooling, when the major problem is that my two cards are too close (secondary is blocking the primary's fan). Can't spread them, as the secondary will be blocked by the PSU :(

Mem clocks are both a 300, and even with default clocks I get this error


Title: Re: Auto re-starting miner every 10 minutes!
Post by: phelix on June 20, 2011, 06:41:46 PM
what temps? if below 80 something is definitely wrong