• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 231
  • Last Modified:

Monitor and Restart a System Service

G'Day,
  We have a client site running Server 2003.  They have a backup tape that should be running every night.  The "Removable Storage" service crashes on a regular basis and despite setting it to auto restart when it crashes, it just marks itself as 'Disabled'.  Once this happens, the backups stop (not surprisingly).

The event logs don't even seem to record anything related to this service stopping, trying to restart or anything so there is no indication of the cause.  We've even replaced the tape drive with another model and changed backup programs (not wholly due to this issue though).

Is there some way to monitor if the service is running, and if isn't, mark it as 'Automatic' and restart it?  It doesn't appear in the task list...

Thanks
0
comptech_engineering
Asked:
comptech_engineering
  • 3
  • 2
  • 2
2 Solutions
 
dan_blagutCommented:
Hi
You can do an VBScript that use net start command to check if the service is running or not. The for starting the service you can use again this command "net start service_name". For changing the status to automatic you can import a specific key in registry using the same VBScript.
If you need help on programming the script let me know.

Dan
0
 
oBdACommented:
A service doesn't set itself to disabled. Check if there's a GPO disabling this service.
On the server, open a command prompt and enter
gpresult /target computer /v >gpresult.txt
which will create a file "gpresult.txt" in the current folder.
Open this file in Notepad or whatever, and check the section System Services for disabled services (the removable storage service is probably "NtmsSvc".
0
 
comptech_engineeringAuthor Commented:
G'Day,
  I have run the GPRESULT command and there is nothing in the "System Services" section at all, so it's not a Group Policy.

And unfortunately, the NET START command will not work if the service is disabled.  I would need to re-enable it first, also through a script and that is far beyond my programming capapbility!

Cheers
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
dan_blagutCommented:
Hi
If you open regedit and go to HKLM\System\CurrentControlSet\Service you can find Removable Storage storage aka NtmsSvc. The you check that your service is on Automatic (the value for start is 2) and perform an save for NtmsSvc in a file (rigth click on NtmsSvc, Export). Save the file under C:\ with the name RemStorAuto.reg
Then you will use the following script:

@echo off
regedit.exe /s c:\RemStorAuto.reg
net start NtmsSvc


That is all
Good luck

Dan
0
 
oBdACommented:
On server 2003, you can use the following command line to set the start type of the service:
sc config ntmssvc start= auto
(note the space after the "="; use "start= demand" for manual start).
0
 
dan_blagutCommented:
Thanks oBdA, then the script becames

@echo off
sc config ntmssvc start= auto
net start NtmsSvc

Dan
0
 
comptech_engineeringAuthor Commented:
A little tweaking was required for this site, but for anybody else who has simialr issues, this should get them going again.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

  • 3
  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now