-1

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
}
Frankruss
  • 33
  • 8

1 Answers1

1

you could take a look at the PSHardwareMonitor powershell module from this Link

This Powershell Module catch the min/max/current value from the CPU and GPU temperature. This Module is based on the OpenHardwaremonitoring Project and will not use the default Windows CIM Class. Thereby all CPUs and GPUs are supported. For more Information see https://openhardwaremonitor.org/

Also you could check @saftargholi reply from this link

Mahmoud Moawad
  • 697
  • 7
  • 14