Bitcoin Forum
May 06, 2024, 02:44:00 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Autorestart a batchfile if a exe file freeze?  (Read 240 times)
rubine2323 (OP)
Member
**
Offline Offline

Activity: 84
Merit: 10


View Profile
October 28, 2017, 12:10:26 PM
 #1

Hello,

is there a way to autorestat a Batchfile if a exe freeze?


For example i start my miner threw a batchfile. If the miner freeze i need a tool which get the freeze close the programm a restart it through the batchfile.
1714963440
Hero Member
*
Offline Offline

Posts: 1714963440

View Profile Personal Message (Offline)

Ignore
1714963440
Reply with quote  #2

1714963440
Report to moderator
1714963440
Hero Member
*
Offline Offline

Posts: 1714963440

View Profile Personal Message (Offline)

Ignore
1714963440
Reply with quote  #2

1714963440
Report to moderator
No Gods or Kings. Only Bitcoin
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714963440
Hero Member
*
Offline Offline

Posts: 1714963440

View Profile Personal Message (Offline)

Ignore
1714963440
Reply with quote  #2

1714963440
Report to moderator
1714963440
Hero Member
*
Offline Offline

Posts: 1714963440

View Profile Personal Message (Offline)

Ignore
1714963440
Reply with quote  #2

1714963440
Report to moderator
1714963440
Hero Member
*
Offline Offline

Posts: 1714963440

View Profile Personal Message (Offline)

Ignore
1714963440
Reply with quote  #2

1714963440
Report to moderator
bathrobehero
Legendary
*
Offline Offline

Activity: 2002
Merit: 1051


ICO? Not even once.


View Profile
October 28, 2017, 12:35:18 PM
 #2

It could be probably done neatly but I just use two batfiles to restart the miner periodically;

the miner .bat file:

:loop
miner.exe ...
goto loop


so that the miner will restart if closed and the second .bat is closing the miner periodically (every hour in this example):

:loop
timeout -t 3600
taskkill -t -f /im miner.exe
goto loop



Not your keys, not your coins!
solarion
Hero Member
*****
Offline Offline

Activity: 966
Merit: 513



View Profile
October 28, 2017, 12:53:38 PM
 #3

It could be probably done neatly but I just use two batfiles to restart the miner periodically;

the miner .bat file:

:loop
miner.exe ...
goto loop


so that the miner will restart if closed and the second .bat is closing the miner periodically (every hour in this example):

:loop
timeout -t 3600
taskkill -t -f /im miner.exe
goto loop




This is the manual operation to mine the bitcoins with the batch file. You need to set the .bat file with the wallet address and reset=o Some of the batch file with cg or claymore software's batch file reset value can be increased to 1 or 2.
Is there are any miner sotware reset automatically without the help of the manual interventions.
not.you
Legendary
*
Offline Offline

Activity: 1726
Merit: 1018


View Profile
October 28, 2017, 08:04:55 PM
 #4

Hello,

is there a way to autorestat a Batchfile if a exe freeze?


For example i start my miner threw a batchfile. If the miner freeze i need a tool which get the freeze close the programm a restart it through the batchfile.

There are ways to do what you want using openhardwaremonitor from http://openhardwaremonitor.org/ but programmatically killing programs and then starting them again is kind of a pain, especially when the programs are called from batch files to begin with so you need to kill batch files and exe files.  If you have a dedicated mining computer (like it isn't your home PC) then you should set it up to autologin and start mining when it gets turned on.  Then the simplest and most reliable way to recover from hung miners is to detect that it is hung and just reboot.  So if there is an associated log entry (like a driver crash) then you can simply setup a scheduled task to run a script that reboots the computer every time the event log is triggered.  Alternatively, you can use a periodic task that calls a script to use openhardwaremonitor to check for GPU usage % and if it seems like it isn't maxed, perform a reboot.  I actually posted a thread with a batch file I created using openhardwaremonitor for something like that around here somewhere if you want to go look for it.  The issue there is that work restarts from the pool will cause GPU % to go down, so you have to do a number of checks in a short period of time and figure out how many low % values you want to consider it a hung miner for a reboot.  If the script runs and just happens to check GPU % when pool work restarts are being sent then it may think the miner is hung when it isn't.  That's why something simple like an event log entry is the best solution if that will work for what you are experiencing.
rubine2323 (OP)
Member
**
Offline Offline

Activity: 84
Merit: 10


View Profile
October 29, 2017, 02:34:35 AM
 #5

Well thanks for your answers. I could handle this with a "check if miner freeze then reboot computer" because on startup my batchfile is starting set my gpus like it should and start mining. But i dont see a good(easy) way of checking if miner freeze close miner restart batchfile?
rubine2323 (OP)
Member
**
Offline Offline

Activity: 84
Merit: 10


View Profile
October 30, 2017, 02:25:16 AM
 #6

Hello,

is there a way to autorestat a Batchfile if a exe freeze?


For example i start my miner threw a batchfile. If the miner freeze i need a tool which get the freeze close the programm a restart it through the batchfile.

There are ways to do what you want using openhardwaremonitor from http://openhardwaremonitor.org/ but programmatically killing programs and then starting them again is kind of a pain, especially when the programs are called from batch files to begin with so you need to kill batch files and exe files.  If you have a dedicated mining computer (like it isn't your home PC) then you should set it up to autologin and start mining when it gets turned on.  Then the simplest and most reliable way to recover from hung miners is to detect that it is hung and just reboot.  So if there is an associated log entry (like a driver crash) then you can simply setup a scheduled task to run a script that reboots the computer every time the event log is triggered.  Alternatively, you can use a periodic task that calls a script to use openhardwaremonitor to check for GPU usage % and if it seems like it isn't maxed, perform a reboot.  I actually posted a thread with a batch file I created using openhardwaremonitor for something like that around here somewhere if you want to go look for it.  The issue there is that work restarts from the pool will cause GPU % to go down, so you have to do a number of checks in a short period of time and figure out how many low % values you want to consider it a hung miner for a reboot.  If the script runs and just happens to check GPU % when pool work restarts are being sent then it may think the miner is hung when it isn't.  That's why something simple like an event log entry is the best solution if that will work for what you are experiencing.


Thank you already got it running. With restart if miner freeze and batch on startup.
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!