You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# What type of error occurred (PROCESSMISSING, FATALERROR, CPULOAD)
3019
+
$errorType=$null
3017
3020
3018
3021
3019
3022
# 1. The process doesn't exist anymore, immediate error
3020
3023
if (!$checkProcess) {
3021
3024
$stressTestError='The '+$selectedStressTestProgram+' process doesn''t exist anymore.'
3025
+
$errorType='PROCESSMISSING'
3022
3026
}
3023
3027
3024
3028
@@ -3032,6 +3036,7 @@ function Test-ProcessUsage {
3032
3036
if ($primeErrorResults.Length-gt0) {
3033
3037
# We don't need to check for a false alarm anymore, as we're already checking only new log entries
3034
3038
$stressTestError=$primeErrorResults.Line
3039
+
$errorType='FATALERROR'
3035
3040
3036
3041
Write-Verbose($timestamp)
3037
3042
Write-Verbose('Found an error in the new entries of the results.txt!')
@@ -3058,6 +3063,7 @@ function Test-ProcessUsage {
3058
3063
if ($primeErrorResults.Length-gt0) {
3059
3064
# We don't need to check for a false alarm anymore, as we're already checking only new log entries
3060
3065
$stressTestError=$primeErrorResults.Line
3066
+
$errorType='FATALERROR'
3061
3067
}
3062
3068
}
3063
3069
@@ -3100,16 +3106,19 @@ function Test-ProcessUsage {
3100
3106
}
3101
3107
3102
3108
else {
3103
-
# Set the error variable if $maxChecks has been reached
3104
-
if ($curCheck-eq$maxChecks) {
3109
+
if ($curCheck-lt$maxChecks) {
3110
+
Write-Verbose(' still not enough usage (#'+$curCheck+')')
3111
+
}
3112
+
3113
+
# Reached the maximum amount of checks for the CPU usage
3114
+
else {
3105
3115
Write-Verbose(' still not enough usage, throw an error')
3106
3116
3107
3117
# We don't care about an error string here anymore
3108
-
$stressTestError='The '+$selectedStressTestProgram+' process doesn''t use enough CPU power anymore (only '+$thisProcessCPUPercentage+'% instead of the expected '+$expectedUsageTotal+'%)'
3109
-
}
3110
-
else {
3111
-
Write-Verbose(' still not enough usage (#'+$curCheck+')')
3118
+
$stressTestError='The '+$selectedStressTestProgram+' process doesn''t use enough CPU power anymore (only '+$thisProcessCPUPercentage+'% instead of the expected '+$expectedUsageTotal+'%)'
3119
+
$errorType='CPULOAD'
3112
3120
}
3121
+
3113
3122
}
3114
3123
}
3115
3124
}
@@ -3120,6 +3129,7 @@ function Test-ProcessUsage {
3120
3129
# We now have an error message, process
3121
3130
if ($stressTestError) {
3122
3131
Write-Verbose('There has been an error with the stress test program!')
3132
+
Write-Verbose('Error type: '+$errorType)
3123
3133
3124
3134
# Store the core number in the array
3125
3135
$Script:coresWithError+=$coreNumber
@@ -3141,6 +3151,28 @@ function Test-ProcessUsage {
3141
3151
}
3142
3152
3143
3153
3154
+
# If running Prime95, make one additional check if the result.txt now has an error entry
3155
+
if ($isPrime95-and$errorType-ne"FATALERROR") {
3156
+
$timestamp=Get-Date-format HH:mm:ss
3157
+
3158
+
Write-Verbose($timestamp+' - The stress test program is Prime95, trying to look for an error message in the results.txt')
3159
+
3160
+
Get-Prime95LogfileEntries
3161
+
3162
+
# Look for a line with an "error" string in the new log entries
0 commit comments