Auto restart possible?

Hey guys,

I have seen a couple users on other forums saying they have a script that auto restarts the .bat miner file if it stops mining or posts an error. Is that true? Is this actually possible? I've been trying to search the forums for a script that does that but I am either not good at searching through forums or there isn't a script out there yet.

Anyone have any ideas?

BTW - I am using EWBF's Cuda miner

1 Like

My Linux rigs all auto restart in about a min if they drop a GPU. This is relatively straight forward in Linux, and both optiminer and Claymore provide watchdog capabilities and scripts that can be implemented via cron. I prefer to do this from a control PC, ssh, and the json port for the miner so that one PC (raspberry Pi) controls multiple rigs and can even kill power to a rig if needed (via Zwave and OpenHAB). Its a bit overkill but I travel allot and sometimes a hard power reset can save the day when I am away (beats trying to talk the Wife through reseting a miner).

I have just started testing the EWBF miner and am disappointed that there is no watchdog capabilities, but it does have a json port (that I don't have working yet). I started testing in Windows but the Nvidia drivers allow over-clocking directly in Linux unlike AMD, so I have switched to Linux. I am finding the Linux miner is much more stable.

I am working on a way to auto restart with the EWBF miner in Linux but since you mention a .bat file I assume you are working in Windows. I do not know an easy way to do what you want in Windows, others may be of more help. If you switch to Linux let me know.

If you're on Windows you may want to proceed as follows, assuming you use a batch file (.bat) and name your label MINE:

:MINE
<your miner code and parameters>

GOTO :MINE

Every time the block of instructions <your miner code and parameters> ends, the GOTO :MINE code loops back to the :MINE label and re-executes them. This is sent in a hurry so make sure to double-check on the net :slight_smile:

1 Like

Which command can we use to restart the ewbf when it crashes ? i don't want to wake up in the morning and see that my miner didn't mined anything,bros

Hello! There are special pieces of hardware that restart your rig once it froze. They only cost about 20 USD on Alibaba or Aliexpress. And pretty easy and straight forward to set up. Here is one. https://www.aliexpress.com/item/Smart-7-24-computer-PC-anti-crash-blue-card-automatic-restart-game-studio-USB-high-efficiency/32820147930.html

You can check it out!

2 Likes

Why would you recommend to buy that? Auto restart can be done in both Windows and Linux very easily.

Im just saying that this is an option.

Windows or Linux? In Windows you can use the EWBF -eexit option in a bat file. However, this is a soft restart of the miner. I find this does not always work reliably. In Linux you can do a low level kernel restart when the miner or GPU hangs. I am biased, but I would not recommend mining in Windows (others will disagree).

1 Like

Well, Ill tell you what. Everyone has their favorite system either Linux or Windows or some other OS. They all have ups and downs. It is up to you as a person to decide what to pick. It's just my point of view.

Linux is great, but i cannot use everuthing, i would've to program all the miners. I use windows because im used to it. So...the -restart is my best option ? thanks for the attention bros

look what i 'd found -r Restart miner mode. "-r 0" (default) - restart miner if something wrong with GPU. "-r -1" - disable automatic restarting. -r >20 - restart miner if something
wrong with GPU or by timer. For example, "-r 60" - restart miner every hour or when some GPU failed.
"-r 1" closes miner and execute "reboot.bat" file ("reboot.bash" or "reboot.sh" for Linux version) in the miner directory (if exists) if some GPU failed.
So you can create "reboot.bat" file and perform some actions, for example, reboot system if you put this line there: "shutdown /r /t 5 /f". Im noob, how can i make this works ?

--eexit 3 will shut down EWBF after 3 restart attempts. There is further explanation in the help file in the directory containing all of the miner files.

1 Like

Then this is the script I use to restart

:restart
TIMEOUT 8
miner --server [SERVER] --port [PORT] --user [USER] --pass x --eexit 3 --log 2 --pec
goto :restart

How reliable is the soft miner exit in Windows via -eexit? I only use windows for testing / modifying BIOS's , not mining. I have not seen the EWBF -eexit work reliably for GPU's locking up in Linux. However, you can always do a killall, restart lightdm or kernel level sysrq restart via a watchdog, so its not a problem

I have to do a hard reset only when I am pushing a machine too hard. I have found it to be extremely reliable. I am running my script on 14 machines. Only 1 was giving issues with hard locks, but when I scaled back my overclocking numbers it became reliable.

That makes sense. I push my OC to the limits so my rigs typically do an automated hard restart once or twice a day. I have an automated OC routine that seeks the best OC just below instability to squeeze the most performance out. I let them restart once a day in the software or the OC will be reduced. It works great but it must have the automated hard restart provided by Linux to work (sysrq magic keys). I don't think its possible in Windows but I could be wrong.

This is would help you.... change all for your setting and then put the time what are you want to restart in seconds ( timeout 14400 /nobreaktimeout )
EWBF Zec CUDA Miner 0.3.4b ---- my bat file -------
it would be restar your miner (no computer)

TIMEOUT 15

set app=miner.exe
set address=eu1-zcash.flypool.org
set user=t1aj6qz4hdDSpaCnv4VBoH5em5zEgTBruJq.rig1
set password=x
:start
start %app% --server %address% --user %user% --pass %password% --port 3333 --cuda_devices 0 1 2 3 4 5 --intensity 64 64 64 64 64 64 --templimit 82
timeout 14400 /nobreak
taskkill /im %app% /f
goto start

Would someone please be so kind as to post some sort of visual/photographic instructions (or video) demonstrating how to correctly implement the auto-restart function for EWBF cuda miner on windows? I see all these scripts posted, but as an individual inexperienced in programming/not wanting to **** something up, I could use some neighborly help.

:there

miner --server zec-us-east1.nanopool.org --user t1d5PUDFKekGNXFzCSTYFCViaC4SWZ1PYTU.rig1/jimmy97one61@gmail.com --pass z --port 6666 --pec --api 127.0.0.1:42000

goto :there

that time 8 is the time in minutes to restart ?
I do an .bat file with that and that's it ?
thanks bro!