Author

Topic: Is there a way to automatically restart cgminer when it stops mining? (Read 10577 times)

sr. member
Activity: 434
Merit: 251
CGWatcher & CGRemote
Will this help if cgminer just frezz... i can`t use cgwatcher because my main display GPU is intel and i have no access to ATI adl

Have you tried using CGWatcher? ADL and NVAPI (Nvidia) are what I use to get GPU info at the moment because I'm not sure there are enough people mining with Intel GPUs to warrant it. I am getting CPU info, including temps, but not doing anything with it because I don't have an Intel GPU to test with and again, it's not very common. But if you also have a discrete AMD or Nvidia card, CGWatcher should have the info for it. If it can use OpenCL and cgminer can see it, CGWatcher should have no problem with it. CGWatcher also loads OpenCL devices and information independent from the miner, but if a device is reported by cgminer that for some reason (unlikely) wasn't reported by OpenCL, CGWatcher adds it anyway.

Regardless, most of the data related to determining if the miner stops mining comes from the miner and doesn't depend on the type of GPU (except for temperatures in some cases). If you're mining with an Intel GPU, cgminer should be providing enough info for most monitoring options in CGWatcher to work. The only ones that will not are temperature related, because CGWatcher currently doesn't do anything with this info and cgminer doesn't get it at all. But accepted shares, non-responding miners, etc. should work for any GPU that cgminer is capable of using.
legendary
Activity: 1901
Merit: 1024
Just run CGMiner in a .bat file. Here's an example:

Code:
:loop
C:\cgminer\cgminer.exe -c C:\Users\User\cgminer2.conf
timeout /T 10
goto loop

Nice! I didn't know this! Thanks it works great.

Will this help if cgminer just frezz... i can`t use cgwatcher because my main display GPU is intel and i have no access to ATI adl
full member
Activity: 224
Merit: 100
Have a look at CGWatcher.
It uses cgminer's API to restart cgminer and can also restart SICK/DEAD GPU's

Thanks for this! I was trying to use Akbash without much success. I will try CGWatcher to see if it's any better Smiley
newbie
Activity: 18
Merit: 0
Have a look at CGWatcher.
It uses cgminer's API to restart cgminer and can also restart SICK/DEAD GPU's
jml
full member
Activity: 238
Merit: 100
In linux, you can create a bash file that checks the process of cgminer. You then can use crontab to poll the process every minute to see if it exists. If not, then restart the cgminer process. Another alternative is to code in C a daemon that runs in the background that does this task for you.
legendary
Activity: 1862
Merit: 1002
If you are on linux you can use monit. It'll even notify you when it restarts the service, etc: http://mmonit.com/monit/
member
Activity: 78
Merit: 10
or drag and drop your shortcut in to the windows startup from the start menu
full member
Activity: 224
Merit: 100
Just run CGMiner in a .bat file. Here's an example:

Code:
:loop
C:\cgminer\cgminer.exe -c C:\Users\User\cgminer2.conf
timeout /T 10
goto loop

Nice! I didn't know this! Thanks it works great.
legendary
Activity: 952
Merit: 1000
I'm using windows and not linux if that helps, so I don't have access to watchdog.
Which platform are you mining on? Win/linux?
Herpy dee derp.

Just run CGMiner in a .bat file. Here's an example:

Code:
:loop
C:\cgminer\cgminer.exe -c C:\Users\User\cgminer2.conf
timeout /T 10
goto loop
sr. member
Activity: 420
Merit: 250
Which platform are you mining on? Win/linux?
newbie
Activity: 20
Merit: 0
I'm not super good with scripting files so I wouldn't even know where to begin with this.

I found something on this forum for at one point but haven't been able to locate it since. It basically follows the workflow that if cgminer stops mining, it'll stop the process, close it, reopen it, and then restart mining with a specific card (every 2 hours or so, just in case maybe?). So while it may not require Logmein access it can sort of fix itself if I don't catch it. I'm using windows and not linux if that helps, so I don't have access to watchdog.

Thanks in advance.
Jump to: