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:
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:
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.
You will see a screen similar to this:
Click on Create Basic Task and name the task something like VPU recover alert and click next:
Select When a specific event is logged and click next:
From the dropdown boxes, select in sequence, Log:System, Source
isplay, then type in Event ID:4101; click next:
Select Start a program, click next:
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:
You will be presented with a summary of the task, tick the Open the Properties dialog box and click Finish:
In General tab, change to Run whether user is logged on or not:
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:
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.
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.
This technique can be used with other monitoring tools that allow you to execute a program on a trigger. Enjoy.
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.
You will see a screen similar to this:
Click on Create Basic Task and name the task something like VPU recover alert and click next:
Select When a specific event is logged and click next:
From the dropdown boxes, select in sequence, Log:System, Source
Select Start a program, click next:
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:
You will be presented with a summary of the task, tick the Open the Properties dialog box and click Finish:
In General tab, change to Run whether user is logged on or not:
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:
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.
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.
This technique can be used with other monitoring tools that allow you to execute a program on a trigger. Enjoy.