Very low maintenance, ever since I added automatic restart scripts on a 24 hour interval and watchdog scripts to restart and log automatically whenever it notices 0% GPU use or network disconnection. I take a little hit while it restarts though.
Care to share more about these scripts? I'd find that very helpful. Thanks!
I have a script called autoexec.cmd start on logon using the Task Scheduler. Autoexec.cmd is a little take on the good times of the past. It will start the miner program and watchdog. I choose the miner program I want to use by commenting out the others using the REM command. After it has started the miner, it will run C:\Tools\watchdog.cmd which will start monitoring that the system is on the network and the GPU's are doing meaningful work. The Autoexec.cmd script will then hibernate (but still stay running) for 24 hours before it restarts the system. All this while watchdog is on another command line session monitoring the system.
I've written these scripts to work on Nvidia mining rigs. They can be freely copied and modified as needed.
C:\Tools\autoexec.cmd
@echo off
echo .---------------------.
echo / INIT SYSTEM SCRIPT /
echo *=====================*
echo.
echo %COMPUTERNAME%
echo.
echo Waiting for WIFI to wake up...
timeout 11
REM -----------------------
REM ETHEREUM
REM call C:\Tools\NVIOC\oc_eth.cmd
REM start C:\Tools\Miners\ethminer-0.11.0.rc1-Win64-nanopool\start_opencl-molivil.bat
REM -----------------------
REM -----------------------
REM NICEHASH
REM OC settings set by startup script
start C:\Tools\Miners\NiceHashMiner\start.cmd
REM -----------------------
REM -----------------------
REM ZCASH
REM call C:\Tools\NVIOC\oc_zec_effic.cmd
REM call C:\Tools\NVIOC\oc_zec_max.cmd
REM start C:\Tools\Miners\Zec.miner.0.3.4b-nanopool\start.bat
REM -----------------------
start C:\Tools\watchdog.cmd
FOR /L %%G IN (22,-1,2) DO (
echo Time before restart: %%G hours
"C:\Program Files\NVIDIA Corporation\NVSMI\nvidia-smi.exe" -q -d temperature |find "GPU Current Temp"
timeout 3600 /nobreak >nul
)
echo Time before restart: 1 hr
timeout 1800 /nobreak >nul
echo Time before restart: 30 mins
timeout 1500 /nobreak >nul
echo Time before restart: 5 mins
timeout 300 /nobreak >nul
echo Restarting now!
timeout 30 /nobreak >nul
shutdown /r
Below is a (VERY CRUDE! )
script that logs every bootup and tries to ping preconfigured IP addresses 8.8.4.4 or 8.8.8.8 every 30 minutes. It will also use the NVIDIA configuration utility that comes with drivers called "nvidia-smi.exe" which tells the watchdog if any GPU is at 0% use. It will try a couple of times and restart if any GPU stays at 0%. Any errors that occur it logs. It's a bit botched together, but works great in my use.
C:\Tools\watchdog.cmd
@echo off
cls
set VERSION=1.6.4
rem ---
rem Watchdog logfile. Watchdog will log system (re)boots and connection failures to this file
set LOGFILE=C:\Tools\watchdog.log
rem ---
rem IP addresses to test. Default is Google DNS server, 8.8.4.4 and 8.8.8.8
set IPTEST=8.8.4.4
set IPTEST2=8.8.8.8
rem ---
rem Watchdog timer. How many seconds to wait between checks.
rem Default is 1800 seconds (30 minutes)
set WDTIMER=1800
rem ---
rem Watchdog timer to retry. How many seconds to wait to retry after a failed attempt.
rem Default is 120 seconds (2 minutes)
set WDTIMERRETRY=120
rem ---
echo ----------------------
echo SYSTEM WATCHDOG v%VERSION%
echo ----------------------
echo.
echo - Will check connectivity to %IPTEST% and %IPTEST2%.
echo - Will check Graphics card utilization.
echo.
echo Checking every %WDTIMER% seconds.
echo.
echo %DATE%-%TIME% Watchdog: Watchdog v%VERSION% started. >> %LOGFILE%
:begin
timeout %WDTIMER% >nul
"C:\Program Files\NVIDIA Corporation\NVSMI\nvidia-smi.exe" -q -d Utilization |find "Gpu" |find " 0 %" && goto GPUError1
rem echo %DATE%-%TIME% Watchdog: GPU test successful.
ping -n 1 %IPTEST% | find "TTL=" >nul
if %errorlevel% == 0 (
rem echo %DATE%-%TIME% Watchdog: connection test successful.
) else (
echo %DATE%-%TIME% Watchdog: Connection test FAILED to %IPTEST%
echo %DATE%-%TIME% Watchdog: Connection test FAILED to %IPTEST% >> %LOGFILE%
echo Retrying in %WDTIMERRETRY% seconds.
timeout %WDTIMERRETRY% >nul
goto retry
)
echo %DATE%-%TIME% Watchdog: All good!
goto begin
:retry
ping -n 1 %IPTEST2% | find "TTL=" >nul
if %errorlevel% == 0 (
echo %DATE%-%TIME% Watchdog: Second connection test successful.
echo %DATE%-%TIME% Watchdog: Second connection test successful. Watchdog timer reset. >> %LOGFILE%
echo Watchdog timer reset.
goto begin
) else (
echo %DATE%-%TIME% Watchdog: Second connection test FAILED to %IPTEST2%
echo %DATE%-%TIME% Watchdog: Second connection test FAILED to %IPTEST2% >> %LOGFILE%
echo Restarting...
echo %DATE%-%TIME% Watchdog: Restarting system due to two connection failed attempts >> %LOGFILE%
goto restart
)
:GPUError1
echo %DATE%-%TIME% Watchdog: GPU IDLE error first attempt.
echo %DATE%-%TIME% Watchdog: GPU IDLE error first attempt. >> %LOGFILE%
echo Retrying in %WDTIMERRETRY% seconds.
timeout %WDTIMERRETRY% >nul
"C:\Program Files\NVIDIA Corporation\NVSMI\nvidia-smi.exe" -q -d Utilization |find "Gpu" |find " 0 %" && goto GPUError2
echo %DATE%-%TIME% Watchdog: GPU test successful.
echo Watchdog timer reset.
goto begin
:GPUError2
echo %DATE%-%TIME% Watchdog: GPU IDLE error second attempt.
echo %DATE%-%TIME% Watchdog: GPU IDLE error second attempt. >> %LOGFILE%
echo Retrying in %WDTIMERRETRY% seconds.
timeout %WDTIMERRETRY% >nul
"C:\Program Files\NVIDIA Corporation\NVSMI\nvidia-smi.exe" -q -d Utilization |find "Gpu" |find " 0 %" && goto GPUError3
echo %DATE%-%TIME% Watchdog: GPU test successful.
echo Watchdog timer reset.
goto begin
:GPUError3
echo %DATE%-%TIME% Watchdog: GPU IDLE error third attempt.
echo %DATE%-%TIME% Watchdog: GPU IDLE error third attempt. >> %LOGFILE%
echo Restarting...
echo %DATE%-%TIME% Watchdog: Restarting system due to GPU underutilization. >> %LOGFILE%
goto restart
:restart
timeout 60 >nul
shutdown /r
The below example script will set the overclock settings for 5x GTX 1060 graphics cards on the console using nvidia profile inspector. It is called from autoexec.cmd, so that the overclock settings are set at boot time. Same functionality can be achieved with Nvidia Afterburner, but one of the Nicehash miners would override/reset my OC settings, so I started using scripts instead. Additional bonus is, that I can run these in a timed loop every hour to "remind" the miner computer of the correct OC settings.
oc_zec_effic.cmd
@echo off
echo OC: ZCash mining (max efficiency)
echo.
C:\Tools\NVIOC\nvidiaInspector.exe -setBaseClockOffset:0,0,50 -setMemoryClockOffset:0,0,220 -setPowerTarget:0,68
C:\Tools\NVIOC\nvidiaInspector.exe -setBaseClockOffset:1,0,50 -setMemoryClockOffset:1,0,220 -setPowerTarget:1,70
C:\Tools\NVIOC\nvidiaInspector.exe -setBaseClockOffset:2,0,50 -setMemoryClockOffset:2,0,220 -setPowerTarget:2,72
C:\Tools\NVIOC\nvidiaInspector.exe -setBaseClockOffset:3,0,50 -setMemoryClockOffset:3,0,220 -setPowerTarget:3,75
C:\Tools\NVIOC\nvidiaInspector.exe -setBaseClockOffset:4,0,50 -setMemoryClockOffset:4,0,700 -setPowerTarget:4,76