I am a miner and i mine from gpu. Sometimes there is a CUDA error that stops mining, I am looking for a batch script which monitors the temperature of all gpu's and if somehow the temperature falls below 50 for 2 mins continuously then create a log with timestamp in a text file and restart the program.
I have tried previous powershell scripts which are of no use. If you all have any other alternative please suggest. This is code i tried but its based on memory thats not what i want i want to monitor temperature.
while ($true) {
Get-Process calc -ea 0 | where { $_.PM -le 10MB } | foreach {
$Path = $_.Path
[bool]$Ping = Test-Connection 8.8.8.8 -Quiet
if ($Path -and $Ping) {
Stop-Process $_ -Force
Start-Process $Path
}
}
sleep -s 1
}