To monitor the Yawcam windows service and have Service Protector automatically restart it if it stops for any reason:
-
Download and install Service Protector, if necessary.
-
Start Service Protector.
-
Select Protector > Add to open the Add Protector window:
-
On the General tab, in the Service to protect field, choose the Yawcam windows service.
You will notice a green circle to the left of the entry if the service is already running, as was the case on our server.
-
If you find that the HTTP service occasionally fails, switch to the Monitor tab where we will set up a failure detection script to tell Service Protector when Yawcam is not serving pages.
-
Follow these instructions to create the failure detection BAT file,
making sure to edit the batch file to specify the HTTP port (usually 8888).
We have called our batch file check-yawcam.bat and placed it in our Yawcam installation folder (C:\Program Files (x86)\Yawcam).
-
Click the "..." button in the Whenever it fails a "sanity check" section and specify the full path to the batch file.
Adjust the Every setting to a value that you can live with. The default of 30 seconds seems too frequent for us so we have specified 10 minutes instead.
-
We are now done configuring Yawcam so click the Save button to record your settings.
In a few seconds, an entry for Yawcam will show up in the Service Protector window. Service Protector is not yet monitoring it though, and you will see the "Not protected" value in the State column:
If Yawcam is running, you can click on the green circle in the "Service State" column to pop up a tooltip showing a few details of the service:
-
To start monitoring Yawcam, choose Protector > Start "Yawcam". The shield icon will become green to indicate that the Yawcam windows service is being managed:
Click on the shield icon to find out about protection:
-
That's it! Next time your computer boots, the Yawcam windows service will start as normal and Service Protector will begin monitoring it to quickly restart it if it stops for any reason.
And now that you have gone through the basics, please feel free to edit Yawcam in Service Protector and check out the many other settings that may help your webcam software to operate smoothly.
For example, send an email when the service fails, check for the service using too much RAM, and much more.