Script/utility to detect a specific service stopped and se..

G

Guest

Guest
Archived from groups: microsoft.public.win2000.general (More info?)

I have a number of Win2k servers and would like to monitor the "Print
Spooler" service. If the "Print Spooler" service is stopped, the script or
utility can send out an e-mail alert to my Outlook mailbox and restart the
"Print Spooler" service.

Any this kind of script or utility available?
If no, any resource or guideline to guide me to write one myself.
 
G

Guest

Guest
Archived from groups: microsoft.public.win2000.general (More info?)

"Terence" <Terence@discussions.microsoft.com> wrote in message
news:45FE4BAE-EC22-4864-B7CB-532119DC7A25@microsoft.com...
> I have a number of Win2k servers and would like to monitor the "Print
> Spooler" service. If the "Print Spooler" service is stopped, the script
or
> utility can send out an e-mail alert to my Outlook mailbox and restart the
> "Print Spooler" service.
>
> Any this kind of script or utility available?
> If no, any resource or guideline to guide me to write one myself.

You could use the Task Scheduler to run the following batch
file once every ten minutes:

@echo off
net start | find /i "Print Spooler" && goto :eof

echo %date% %time% Print spooler failed. >> c:\PrintSpooler.txt
net start "Print Spooler"
set subject="Print Spooler service restarted"
net start | find /i "Print Spooler" || set subject="Failed to restart Print
Spooler service"
blat -.. -.. -.. -Subject "%Subject%"

You can use any number of command line mailers to generate your
message, e.g. blat, mailto, sendmail. They are all freely downloadable
from various sites.
echo