[Guide] VPU recover alert in Windows

rhavern

[H]ard|DCer of the Month - Apr. 2013/Oct. 2014
Joined
Mar 26, 2011
Messages
508
Running FAH GPU clients? Worried about VPU recovers stopping your folding progress? You should be, VPU recovers silently halt the client. Here's what I did to get an alert email when a VPU recover happens.

My experience is with Windows 7, other versions should be similar but YMMV.

VPU recovers in Windows create an event that is logged. We can trigger an action on that event to let us know that "Bad Things" have happened and human intervention is required. This guide covers two aspects, creating an action and sending the alert.

Step 1, command line email configuration:

I'm certain that there are many other programs out there that will accomplish this however this one works and is free. If you are running your own SMTP instance, you don't need my help, skip to step two. In this example, I have used Yahoo and Gmail as my SMTP portals. They use two different methods of authentication and whatever provider you use is likely to follow one of the two methods. Software is available here: http://caspian.dotconf.net/menu/Software/SendEmail/

Gmail requires TLS support, Yahoo does not, so download appropriately. Extract the files to somewhere useful, I used \Program Files\sendEmail and \Program Files\sendEmail-v156-with-TLS. Obviously you will need an account with the relevant web mail provider.

Gmail:
Code:
"C:\Program Files\sendEmail-v156-with-TLS\sendEmail.exe" -f <username>@yahoo.co.uk -t <username>@yahoo.co.uk -u Server1 VPU recover -s smtp.gmail.com:587 -o username=<username>@gmail.com -o password=<pwd> -m Check server1 for VPU recover

Run this from cmd and see if you get an email. I only check Yahoo on my smartphone, so even though I'm using Gmail SMTP, I'm sending it to Yahoo. Customize as suits your requirements. If you are using two factor authentication (and you should be), generate an application specific password for this usage.

Yahoo:
Code:
"C:\Program Files\sendemail\sendEmail.exe" -f <username>@yahoo.co.uk -t <username>@yahoo.co.uk -u Server1 VPU recover -s smtp.mail.yahoo.co.uk -xu <username>@yahoo.co.uk -xp <pwd> -m Check server1 for VPU recover

Substitute your local specific Yahoo domain as required and run from cmd.

Whichever way you have decided to go, you should be able to send an email on demand from the command line at this point. Save the command line entry that you wish to use. Well done, half way there.

Step 2, configuring event viewer to send an alert:

Go to Control Panel\All Control Panel Items\Administrative Tools and open Task Scheduler.
rSoeQ3U7


You will see a screen similar to this:
WHqYFH2c


Click on Create Basic Task and name the task something like VPU recover alert and click next:
OuNLunyw


Select When a specific event is logged and click next:
QltwFmKZ


From the dropdown boxes, select in sequence, Log:System, Source:Display, then type in Event ID:4101; click next:
tnLmYemN


Select Start a program, click next:
qOJhPhy9


In the Program/script: box, enter the portion of the command line sendEmail that is in double quotation marks, in Add arguments (optional): box, put the rest of the line and click next:
BuPmOPem


You will be presented with a summary of the task, tick the Open the Properties dialog box and click Finish:
77lC3PwN


In General tab, change to Run whether user is logged on or not:
AxvcyuQG


In Settings tab, select Run task as soon as possible after a scheduled start is missed and change Stop the task if it runs longer than: to 1 hour and click OK:
tgOdil4Q


If prompted, enter the password for the user running the task and you are done. In Task Scheduler window, click on Task Scheduler Library and you should see your newly created task. You can right-click on the task and select Run to test that it works.
8kAPndwS


Now that you have gone to the trouble of setting up a command line email program, I'd suggest you also install Core Temp, http://www.alcpu.com/CoreTemp/ . This program monitors your CPU temperature and allows you to take specific action to prevent damage and alert you. Once installed, under Options/Setting/General, make sure Start Core Temp with Windows is selected. When you have customized the other settings to your liking, go to Options/Overheat Protection, tick the Enable box and customize the setting as you wish. The main thing to do here is put your command line email entry in the Execute program: box. Now you will get an email alert if your folding box ever gets too hot.
wNGCuvDq


This technique can be used with other monitoring tools that allow you to execute a program on a trigger. Enjoy.
 
Went through the setup and it looks like its all working properly. hopefully this will minimize my downtime. Excellent guide!

edit: aaaand I had my first VPU recover. E-mail was sent exactly as it should and it all works perfectly.
 
Last edited:
Additional useful things you can do with this type of scheduled task:

Typically, when you get a VPU recover, the affected GPU drops to a safe speed to protect itself and won't resume normal speeds until it is reset in some fashion. There is more than one way to do this, but I want to automate it using the same methodology as getting the email as described above. Microsoft has a command line program that allows you to restart your system and we can call this using a task just like the one we sent an email with. I'm using Windows 7 in this example, so other versions may vary.

Create another Basic Task as listed above, using the same triggers. The only difference is the program to execute.

On the program line, we put this: "C:\Windows\System32\shutdown"

On the argument line, we put this: /r /t 30 /d 4:6 /c "VPU recover"

The arguments in sequence mean:
  • Shutdown and restart the computer.
  • Set the time-out period before shutdown to 30 seconds.
  • Provide the reason for the restart or shutdown. Application: Unstable
  • Comment on the reason for the restart or shutdown.

You can see a full list of options on the shutdown command by executing shutdown /? from a cmd windows. I chose a 30 second delay so the first task of sending an email has time to complete. YMMV
 
Back
Top