1

The company I work for has a server that monitors the outside camera/surveillance system. The following process continues to die: PureActiv Video Processor.

My team has to consistently restart the service manually using Computer Management.

Can anyone provide me a script that will check the service and restart the service if it’s not running.

Below is the information needed:

System: Windows Server 2003 Service Edition Service Pack 2 (build 3790) Service: PureActiv Video Processor Service Location: "C:\Program Files\PureTech Systems\PureActivDAQServices\Pure.PureLink.VideoProcessor.VideoProcessorService.exe"

Thank you, -jm

6 Answers 6

14

If the service is starting and terminating improperly then you don't need a script to do this.

  1. Open the Services control panel
  2. Right-click on the service and get properties
  3. Click on the Recovery tab and edit the settings there

EDIT:
Yes, and as everyone has added you should certainly be checking to see what is going on with the service. Travelling Tech Guy makes a good point about memory leaks.

7

I would also check the Event Viewer to see why the service crashes - it could be that a minor fix, or a driver update would solve the problem permanently.

Another point: if the process leaks memory and leaves allocated memory behind when it crashes, restarting it over and over decreases the OS stability and increases the chance your entire system will run out of resources sooner.

In short, my recommendation is to deal with the problem, not put a band-aid on it :)

1

See if you or someone you delegate can periodically run Sysinternals Process Explorer on the machine and service affected after it has been running for a day.

Under services.msc, get the properties of the service; the name of the executable should be found there. That's what you will monitor in Process Explorer. In PE, rightclick on the name of the executable and get its properties. Note memory usage.

After the service crashes, don't restart it right away. Run PE, and start the service. Get its properties and note its memory usage after it has been working for a few minutes.

You may have a case to report back to the vendor with a buggy driver.

Workarounds as listed earlier include restarting the service through the Service dialog, restarting the service through an scheduled script or rebooting the machine on a schedule, say every day at noon or midnight or whenever some downtime can be tolerated.

0

You can schedule a simple vbs script like this one to restart periodically the service on the local computer only if needed.

strComputer = "." 
strSvcName = "PureActiv Video Processor" 
set objWMI = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
set objService = objWMI.Get("Win32_Service.Name='" & strSvcName & "'")
If objService.State= "Stopped" Then
    objService.StartService()
End If


This question has already been asked, see How can I automatically restart a Windows service if it crashes?

Hope this helps.

0

This is a job for a more general system health and monitoring tool, like ActivExperts Network Monitor or something more expensive (Operations Manager) or more open source (Nagios) et al ^^

3
  • Probably not, unless this is a much bigger shop than described or there are a thousand such instances of this service.
    – dmoisan
    Aug 16, 2009 at 2:06
  • A dozen would be enough to warrant proper monitoring - but I agree this is probably not the case. Just wanted to add the "other angle" and be a prick ;) Aug 16, 2009 at 11:26
  • No, when I think about it, even a single service warrants a proper monitoring suite... but that's still the prick in me talking ^^ Aug 16, 2009 at 11:38
0

@Oskar re monitoring even a single server - you could even use something like Service Hawk which monitors windows wervices without having to use such a large monitoring suite.

You must log in to answer this question.