Is there a command for the lol miner to restart if the megahash falls below certain values? Phoenix Miner has it and it is a very convenient feature.
This is for Windows it will restart if goes to 0. You can also play with the watchdog to run the script...in case a error happens.
This script in case hash 0 in Windows:
@echo off
setlocal enableDelayedExpansion
set url=http://127.0.0.1:4444
set file=lolMiner.json
set tmpfile=Perfomance.json
Rem #################################
Rem ## Begin of user-editable part ##
Rem #################################
set "POOL=eth.2miners.com:2020"
set "WALLET=0x155da78b788ab54bea1340c10a5422a8ae88142f.lolMinerWorker"
Rem #################################
Rem ## End of user-editable part ##
Rem #################################
:loop
start lolMiner.exe --algo ETHASH --pool !POOL! --user !WALLET! --apiport 4444
:mining
timeout 120
type NUL > %file%
type NUL > %tmpfile%
echo Proving Stats, press CTRL-C and Y to Quit!
certutil -urlcache -split -f %url% %file%
fc %file% %tmpfile% > nul
if errorlevel 1 (goto online) else (goto crash)
:online
findstr "Performance_Summary" %file% > %tmpfile%
FOR /F "tokens=* delims=" %%x in (%tmpfile%) DO echo %%x
for /f "tokens=* delims= " %%a in (%tmpfile%) do set str=%%a
if "%str%"==""Performance_Summary": 0.00," (goto restart) else (goto mining)
:restart
echo "Killing Process"
taskkill /IM "lolMiner.exe" /F
echo "Restarting lolMiner"
goto loop
:crash
echo "LolMiner Not Running, restarting lolMiner"
goto loop
This script to watchdog emergency.bat
setlocal enableDelayedExpansion
Rem ##################################
Rem ## Emergency script in case the ##
Rem ## miner crashes. User defined ##
Rem ## actions to be inserted here ##
Rem ##################################
taskkill /im "lolMiner.exe" /F
C:\your_lolminer_folder\your_mine_eth_or_etc_or_beam_file.bat