Skip to content

Commit a3d6069

Browse files
committed
Update example.bat
1 parent e1c03b5 commit a3d6069

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ Example batch file content:
1414
:s
1515
CPUUsageMonitor.exe -cpuUsageThreshold=90 -handlesThreshold=75000 -memoryCommitThresholdMB=1024 -programRegEx="YourProblematicExecutableName"
1616
pskill.exe "YourProblematicExecutableName"
17-
sleep 1
17+
ping -n 2 127.0.0.1
18+
REM sleep 1
1819
goto s
1920

2021
The above example monitors two resource usage metrics of a process called "YourProblematicExecutableName". Once ANY of the CPU usage percent metric, handle usage count metric, or the committed memory usage metric exceed the corresponding threshold, the process will be killed by the next command in the batch file. By default the trigger activates (that is, CPU Usage Monitor quits) when some of the thresholds is exceeded for 3 consequtive checks with 5 second intervals, and then the resource usage violation continues for another 30 seconds after that. If the monitored process resumes normal resource usage during that additional time interval then the trigger is reset and CPU Usage Monitor continues running without quitting.

example.bat

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@
22
:s
33
CPUUsageMonitor.exe -handlesThreshold=75000 -memoryCommitThresholdMB=1024 -programRegEx="YourProblematicExecutableName"
44
pskill.exe "YourProblematicExecutableName"
5-
sleep 1
5+
ping -n 2 127.0.0.1
6+
REM sleep 1
67
goto s

0 commit comments

Comments
 (0)