Would love to know how to integrate GPU Threshold once reached.
For example below 10% Usage for the Program/App to exit and if possible in a batch file, I've tried with a mix of CPU+memory threshold but that don't always work properly in all Apps, so I thought GPU threshold would solve this since it is pretty definite at times unlike CPU+memory thresholds which can vary greatly sometimes.
Here's a batch example for the threshold that needs a GPU threshold included
@echo OFF
set VK_LAYER_PATH="" "DOOM;%VK_LAYER_PATH%"
set VK_INSTANCE_LAYERS=VK_LAYER_reshade
@start "" "DOOMx64vk.exe" +devMode_Enable 1 +com_restarted 1 +com_gameMode 1 +com_skipIntroVideo 1 +exec DOOMConfig.cfg 1 +image_usecompression 0 +com_skipKeyPressOnLoadScreens 1
TIMEOUT /t 20
:: set process_name:
set process_name=DOOMx64vk.exe
::=================================================================
cd /D "C:\Program Files\NVIDIA Corporation\NVSMI\"
:GPU
for /f skip^=8^ tokens^=1-3^ delims^=^| %%a in ('"nvidia-smi.exe"') do (
for /f "tokens=1-6 delims= " %%g in ("%%a") do set u=%%g & set v=%%h) & set w=%%j) & (
for /f "tokens=1-3 delims= " %%g in ("%%b") do set x=%%g & set y=%%i) & (
for /f "tokens=1-2 delims= " %%g in ("%%c") do set z=%%g) & goto :breakForLoop
:breakForLoop
set /a u+=0 & set /a v+=0 & set /a w+=0 & set /a x+=0 & set /a z+=0
set /a u=u & set /a v=v & set /a w=w & set /a x=x & set /a z=z
echo %u%, %v%, %w%, %x%, %y%, %z%
pause
timeout /t 5
goto GPU
if %z% Lss 20 TaskKill /F /im %process_name% & goto RUNNING
timeout /t 3
:RUNNING
tasklist|findstr %process_name% > nul &&
taskkill /F /T /IM "cheatengine-x86_64.exe" & taskkill /F /T /IM "Werfault.exe" & exit /b
timeout /t 1
GOTO RUNNING